Proper null handling in equality, inequality and membership operators for all SV column data types#9173
Merged
Jackie-Jiang merged 11 commits intoapache:masterfrom Aug 6, 2022
Merged
Conversation
…IN/NOT_IN predicate
Jackie-Jiang
reviewed
Aug 5, 2022
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 |
Contributor
There was a problem hiding this comment.
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)
Contributor
Author
There was a problem hiding this comment.
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
Jackie-Jiang
reviewed
Aug 5, 2022
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
Jackie-Jiang
reviewed
Aug 5, 2022
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java
Outdated
Show resolved
Hide resolved
Jackie-Jiang
approved these changes
Aug 5, 2022
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 |
Contributor
|
Related to #8697 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feature,release-notes,bug-fix