New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling null fields in the filtertransformer and validator #796
Conversation
Codecov Report
@@ Coverage Diff @@
## master #796 +/- ##
==========================================
- Coverage 92.72% 92.68% -0.05%
==========================================
Files 68 68
Lines 3669 3675 +6
==========================================
+ Hits 3402 3406 +4
- Misses 267 269 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
b3957ab
to
d810c1a
Compare
d810c1a
to
e55b6ba
Compare
I'll wait for @JPBergsma to have a look at this before merging! |
6a98ab1
to
e7b092b
Compare
I think Mongo DB uses null for missing values. |
The Python special NoneType value Essentially, MongoDB Or did you mean that it should be the string |
@CasperWA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appart from the minor point in tests/server/routers/test_structures.py , I did not see any mistakes in this code. Although I did not fully understand the code in validator.py
84e94e6
to
0661287
Compare
…lidator - Add validation of null/missing fields and negated queries - Add null fields to test data - Add router tests for filters on null fields - Mongo transformer workaround for negative queries on null fields - Fix != queries returning null fields for elasticsearch
0671b69
to
7ef9117
Compare
Closes #792, as reported by @JPBergsma.
This PR:
null != 1
evaluates to true)."$ne": null
expressions to all "$ne" filters in theMongoTransformer
."exists": True
expression to all "!=" filters in theElasticsearchTransformer
.