Jackie-Jiang commented on a change in pull request #8419:
URL: https://github.com/apache/pinot/pull/8419#discussion_r836966601



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ValueInTransformFunction.java
##########
@@ -118,10 +119,9 @@ public Dictionary getDictionary() {
           _dictIdSet.add(dictId);
         }
       }
-      _dictIds = new int[DocIdSetPlanNode.MAX_DOC_PER_CALL][];
+      _dictIds = new int[length][];

Review comment:
       We should have a separate check if this in case the buffer is not big 
enough. Same for other methods

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ArrayAverageTransformFunction.java
##########
@@ -71,11 +70,12 @@ public TransformResultMetadata getResultMetadata() {
 
   @Override
   public double[] transformToDoubleValuesSV(ProjectionBlock projectionBlock) {
-    if (_results == null) {
-      _results = new double[DocIdSetPlanNode.MAX_DOC_PER_CALL];
+    int numDocs = projectionBlock.getNumDocs();

Review comment:
       (minor) Consider using `length` everywhere for consistency




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to