shenyu0127 commented on code in PR #11249:
URL: https://github.com/apache/pinot/pull/11249#discussion_r1282511755
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/ExpressionScanDocIdIterator.java:
##########
@@ -148,8 +149,18 @@ private void processProjectionBlock(ProjectionBlock
projectionBlock, BitmapDataP
TransformResultMetadata resultMetadata =
_transformFunction.getResultMetadata();
if (resultMetadata.isSingleValue()) {
_numEntriesScanned += numDocs;
- boolean predicateEvaluationResult = _predicateEvaluationResult ==
PredicateEvaluationResult.TRUE;
RoaringBitmap nullBitmap = null;
+ if (_predicateEvaluationResult == PredicateEvaluationResult.NULL) {
+ nullBitmap = _transformFunction.getNullBitmap(projectionBlock);
+ if (nullBitmap != null) {
+ for (int i : nullBitmap) {
+ matchingDocIds.add(_docIdBuffer[i]);
Review Comment:
Done.
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/ExpressionScanDocIdIterator.java:
##########
@@ -315,6 +326,10 @@ private void processProjectionBlock(ProjectionBlock
projectionBlock, BitmapDataP
}
} 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");
Review Comment:
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 an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]