-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Proper null handling in equality, inequality and membership operators for all SV column data types #9173
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
Conversation
…IN/NOT_IN predicate
Jackie-Jiang
left a comment
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.
Mostly good
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
Outdated
Show resolved
Hide resolved
| @Override | ||
| public boolean doesValueMatch(int docId) { | ||
| if (_nullBitmap.contains(docId)) { | ||
| // Any comparison (equality, inequality, or membership) with null results in false (similar to Presto) even if |
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.
Does this mean we should use IS NULL and IS NOT NULL? We should add it to the comment
Also, suggest either copy the comment to all the classes, or move it to the first class (DictIdMatcherAndNullHandler)
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.
For nulls to get considered, one of 4 operators can be used:
IS NULLIS NOT NULLIS DISTINCT FROM=> We need to implement it in Apache PinotIS NOT DISTINCT FROM=> We need to implement it in Apache Pinot
Please check unit tests as they demonstrate the behaviour if IS NULL or IS NOT NULL are used.
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/predicate/PredicateUtils.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/GapfillFilterHandler.java
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/HavingFilterHandler.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/filter/PredicateRowMatcher.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/operator/docidsets/SVScanDocIdSet.java
Outdated
Show resolved
Hide resolved
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #9173 +/- ##
============================================
+ Coverage 69.92% 69.96% +0.03%
+ Complexity 5008 5004 -4
============================================
Files 1847 1847
Lines 98549 98684 +135
Branches 14967 15007 +40
============================================
+ Hits 68913 69041 +128
+ Misses 24793 24786 -7
- Partials 4843 4857 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
|
Related to #8697 |
feature,release-notes,bug-fix