robinyqiu commented on a change in pull request #13483:
URL: https://github.com/apache/beam/pull/13483#discussion_r539664326



##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/SqlOperators.java
##########
@@ -81,6 +72,12 @@
           x -> createTypeFactory().createSqlType(SqlTypeName.VARCHAR),
           new UdafImpl<>(new StringAgg.StringAggString()));
 
+  public static final SqlOperator ARR_AGG_ARR_FN =
+          createUdafOperator(
+                  "array_agg",
+                  x -> createTypeFactory().createSqlType(SqlTypeName.ARRAY),

Review comment:
       Yeah, ARRAY_AGG should be generic. I said the type should be "BIGINT NOT 
NULL ARRAY NOT NULL" because that's from the error message.
   
   Sonam, I believe there is some way that you can get the element type from 
the input `x`. You don't need to define your new mapping.




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

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


Reply via email to