Skip to content

Conversation

@nizarhejazi
Copy link
Contributor

@nizarhejazi nizarhejazi commented Aug 5, 2022

  1. Proper null handling in equality, inequality and membership operators for all SV column data types.
  2. Fix a bug in retrieving dictionary id set of the values in the given IN/NOT_IN predicate

feature, release-notes, bug-fix

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly good

@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
Copy link
Contributor

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)

Copy link
Contributor Author

@nizarhejazi nizarhejazi Aug 5, 2022

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:

  1. IS NULL
  2. IS NOT NULL
  3. IS DISTINCT FROM => We need to implement it in Apache Pinot
  4. IS 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.

@Jackie-Jiang Jackie-Jiang added feature release-notes Referenced by PRs that need attention when compiling the next release notes bugfix labels Aug 5, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2022

Codecov Report

Merging #9173 (741a790) into master (4125daa) will increase coverage by 0.03%.
The diff coverage is 68.78%.

@@             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     
Flag Coverage Δ
integration1 26.21% <18.47%> (-0.02%) ⬇️
integration2 24.79% <17.83%> (-0.08%) ⬇️
unittests1 67.05% <68.15%> (-0.01%) ⬇️
unittests2 15.33% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...operator/filter/RangeIndexBasedFilterOperator.java 70.93% <ø> (ø)
.../pinot/core/query/reduce/filter/NotRowMatcher.java 0.00% <0.00%> (ø)
...core/operator/filter/predicate/PredicateUtils.java 68.18% <38.46%> (-5.90%) ⬇️
...e/operator/dociditerators/SVScanDocIdIterator.java 75.25% <65.45%> (-18.63%) ⬇️
...ot/core/query/reduce/filter/RowMatcherFactory.java 44.44% <75.00%> (ø)
.../pinot/core/operator/docidsets/SVScanDocIdSet.java 100.00% <100.00%> (ø)
...inot/core/operator/filter/FilterOperatorUtils.java 87.50% <100.00%> (+0.15%) ⬆️
.../core/operator/filter/ScanBasedFilterOperator.java 100.00% <100.00%> (ø)
...ava/org/apache/pinot/core/plan/FilterPlanNode.java 82.44% <100.00%> (+0.27%) ⬆️
.../pinot/core/query/reduce/GapfillFilterHandler.java 85.71% <100.00%> (ø)
... and 55 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@Jackie-Jiang Jackie-Jiang merged commit 1cb172a into apache:master Aug 6, 2022
@Jackie-Jiang
Copy link
Contributor

Related to #8697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix feature release-notes Referenced by PRs that need attention when compiling the next release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants