-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ExpressionFilterOperator IS NULL and IS NOT NULL support. #11249
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
ExpressionFilterOperator IS NULL and IS NOT NULL support. #11249
Conversation
fe3d7f5 to
8504dc4
Compare
Codecov Report
@@ Coverage Diff @@
## master #11249 +/- ##
==========================================
- Coverage 0.11% 0.11% -0.01%
==========================================
Files 2229 2229
Lines 119957 119983 +26
Branches 18173 18183 +10
==========================================
Hits 137 137
- Misses 119800 119826 +26
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| nullBitmap = _transformFunction.getNullBitmap(projectionBlock); | ||
| if (nullBitmap != null) { | ||
| for (int i : nullBitmap) { | ||
| matchingDocIds.add(_docIdBuffer[i]); |
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.
(format) Indentation
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.
Done.
| } else { | ||
| // TODO(https://github.com/apache/pinot/issues/10882): support NULL for multi-value. | ||
| if (_nullHandlingEnabled || _predicateEvaluationResult == PredicateEvaluationResult.NULL) { | ||
| throw new UnsupportedOperationException("NULL handling is not supported for multi-value"); |
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.
We don't want to throw exception here. Think of a case where user needs null handling for other operators, but has a filter on MV column
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.
Good point.
Modified the code to not throw an exception when null handling is enabled, and to return empty matching document IDs when _predicateEvaluationResult == PredicateEvaluationResult.NULL. Also added unit tests for those two scenarios.
This is to support "WHERE func(column) IS NULL" and "WHERE func(column) IS NOT NULL".
#11209