gortiz commented on code in PR #11546: URL: https://github.com/apache/pinot/pull/11546#discussion_r1319444154
########## 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++) { Review Comment: I'm not sure if it is possible, but performance wise, I think it would be better to iterate over the arguments first in order to always use the same nullBitmap and therefore reduce the memory preasure. ########## 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++) { Review Comment: I'm not sure if it is possible, but performance wise, I think it would be better to iterate over the arguments first in order to always use the same nullBitmap and therefore reduce the memory pressure. -- 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