gortiz commented on code in PR #11546:
URL: https://github.com/apache/pinot/pull/11546#discussion_r1319452061


##########
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:
   Oh! and the int 0 is the value we use as false. That makes sense. Maybe the 
reason is that it is early morning here and I'm not 100% woken up, but it looks 
confusing to me. I would prefer to see something like 
`BooleanUtils.isFalse(intValuesSVs[i])`, but that method requires an Object, so 
it would imply to do boxing.
   
   We can create a `public static boolean isFalseInternalValue(int value)`, but 
I leave that decision to you.



-- 
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

Reply via email to