You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "KKcorps (via GitHub)" <gi...@apache.org> on 2023/05/01 07:27:29 UTC

[GitHub] [pinot] KKcorps commented on a diff in pull request #10613: [feature] [null support # 10] Add null support in all transform function and pass the bitmap to upstream

KKcorps commented on code in PR #10613:
URL: https://github.com/apache/pinot/pull/10613#discussion_r1181438028


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/CoalesceTransformFunction.java:
##########
@@ -399,4 +390,22 @@ public String[] transformToStringValuesSV(ValueBlock valueBlock) {
     }
     return getStringTransformResults(valueBlock);
   }
+
+  @Override
+  public RoaringBitmap getNullBitmap(ValueBlock valueBlock) {
+    RoaringBitmap[] nullBitMaps = getNullBitMaps(valueBlock, _transformFunctions);
+    RoaringBitmap bitmap = nullBitMaps[0];
+    for (int i = 1; i < nullBitMaps.length; i++) {
+      RoaringBitmap curBitmap = nullBitMaps[i];
+      if (bitmap != null && curBitmap != null) {
+        bitmap.and(curBitmap);
+      } else {
+        bitmap = null;

Review Comment:
   we can break the loop when setting bitmap to null



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org