You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "klsince (via GitHub)" <gi...@apache.org> on 2023/04/19 18:23:38 UTC

[GitHub] [pinot] klsince commented on a diff in pull request #10575: [feature] [null support # 7] Support null in least and greatest transform functions.

klsince commented on code in PR #10575:
URL: https://github.com/apache/pinot/pull/10575#discussion_r1171700489


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/GreatestTransformFunction.java:
##########
@@ -44,6 +56,36 @@ public int[] transformToIntValuesSV(ValueBlock valueBlock) {
     return _intValuesSV;
   }
 
+  @Override
+  public Pair<int[], RoaringBitmap> transformToIntValuesSVWithNull(ValueBlock valueBlock) {
+    int numDocs = valueBlock.getNumDocs();
+    initIntValuesSV(numDocs);
+    Pair<int[], RoaringBitmap> values = _arguments.get(0).transformToIntValuesSVWithNull(valueBlock);
+    System.arraycopy(values.getLeft(), 0, _intValuesSV, 0, numDocs);
+    RoaringBitmap nullBitmap = values.getRight();
+    for (int i = 1; i < _arguments.size(); i++) {
+      values = _arguments.get(i).transformToIntValuesSVWithNull(valueBlock);
+      RoaringBitmap curNull = values.getRight();

Review Comment:
   nit: define a var for `int[] curValues = values.getLeft()` to be a bit more readable



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