gortiz commented on code in PR #11546: URL: https://github.com/apache/pinot/pull/11546#discussion_r1319442926
########## pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/AndOperatorTransformFunction.java: ########## @@ -45,4 +48,37 @@ int getLogicalFuncResult(int left, int right) { } return 0; } + + @Nullable + @Override + public RoaringBitmap getNullBitmap(ValueBlock valueBlock) { + int numDocs = valueBlock.getNumDocs(); + int numArguments = _arguments.size(); + int[][] intValuesSVs = new int[numArguments][numDocs]; + RoaringBitmap[] nullBitmaps = new RoaringBitmap[numArguments]; + RoaringBitmap nullBitmap = new RoaringBitmap(); + for (int i = 0; i < numArguments; i++) { + intValuesSVs[i] = _arguments.get(i).transformToIntValuesSV(valueBlock); + nullBitmaps[i] = _arguments.get(i).getNullBitmap(valueBlock); + } + for (int docId = 0; docId < numDocs; docId++) { + boolean isFalse = false; + for (int i = 0; i < numArguments; i++) { + if ((nullBitmaps[i] == null || !nullBitmaps[i].contains(docId)) && intValuesSVs[i][docId] == 0) { Review Comment: I don't understand this predicate. Specifically I don't understand why `!nullBitmaps[i].contains(docId)) && intValuesSVs[i][docId] == 0` implies that we don't need to check for the other docIds or arguments. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org