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


##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AggregationFunctionFactory.java:
##########
@@ -47,11 +49,16 @@ public class AggregationFunctionFactory {
   private AggregationFunctionFactory() {
   }
 
+  public static AggregationFunction getAggregationFunction(FunctionContext 
function, boolean nullHandlingEnabled) {
+    return getAggregationFunction(function, false, nullHandlingEnabled);
+  }
+
   /**
    * Given the function information, returns a new instance of the 
corresponding aggregation function.
    * <p>NOTE: Underscores in the function name are ignored in V1.
    */
-  public static AggregationFunction getAggregationFunction(FunctionContext 
function, boolean nullHandlingEnabled) {
+  public static AggregationFunction getAggregationFunction(FunctionContext 
function, boolean isDistinct,

Review Comment:
   This is the error for the query:
   ```
   SELECT 
       Origin, Dest,
       LISTAGG(Carrier, ', ', 'true') WITHIN GROUP (ORDER BY Carrier)
   FROM 
       airlineStats
   GROUP BY 
       Dest, Origin
   ```
   ```
   ProcessingException(errorCode:150, message:SQLParsingError:
   java.lang.Exception: Unable to find table for this query
        at 
org.apache.pinot.controller.api.resources.PinotQueryResource.getMultiStageQueryResponse(PinotQueryResource.java:222)
        at 
org.apache.pinot.controller.api.resources.PinotQueryResource.executeSqlQuery(PinotQueryResource.java:179)
        at 
org.apache.pinot.controller.api.resources.PinotQueryResource.handlePostSql(PinotQueryResource.java:127)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   ...
   Caused by: java.lang.RuntimeException: Error composing query plan for: 
SELECT 
       Origin, Dest,
       LISTAGG(Carrier, ', ', 'true') WITHIN GROUP (ORDER BY Carrier)
   FROM 
       airlineStats
   ...
   Caused by: org.apache.calcite.runtime.CalciteContextException: From line 3, 
column 5 to line 3, column 34: Invalid number of arguments to function 
'LISTAGG'. Was expecting 1 arguments
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   ...
   Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Invalid 
number of arguments to function 'LISTAGG'. Was expecting 1 arguments
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
        at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490))
   ```



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