xiangfu0 commented on code in PR #11822:
URL: https://github.com/apache/pinot/pull/11822#discussion_r1364742080


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactory.java:
##########
@@ -227,14 +238,40 @@ public static AggregationFunction 
getAggregationFunction(FunctionContext functio
             }
           }
           case ARRAYAGG: {
-            Preconditions.checkArgument(numArguments == 2,
-                "ARRAY_AGG expects 2 arguments, got: %s. The function can be 
used as "
-                    + "arrayAgg(dataColumn, 'dataType')", numArguments);
+            Preconditions.checkArgument(numArguments >= 2,
+                "ARRAY_AGG expects 2 or 3 arguments, got: %s. The function can 
be used as "
+                    + "arrayAgg(dataColumn, 'dataType', ['isDistinct'])", 
numArguments);

Review Comment:
   agreed, I was also thinking about this, however it's not parsed in v1 query 
engine.



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