ibzib commented on a change in pull request #14588:
URL: https://github.com/apache/beam/pull/14588#discussion_r617734406



##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/AggregateScanConverter.java
##########
@@ -200,14 +203,14 @@ private AggregateCall convertAggCall(
               + " aggregation.");
     }
 
-    SqlAggFunction sqlAggFunction =
-        (SqlAggFunction)
-            
SqlOperatorMappingTable.ZETASQL_FUNCTION_TO_CALCITE_SQL_OPERATOR.get(
-                aggregateFunctionCall.getFunction().getName());
-    if (sqlAggFunction == null) {
-      throw new UnsupportedOperationException(
-          "Does not support ZetaSQL aggregate function: "
-              + aggregateFunctionCall.getFunction().getName());
+    SqlAggFunction sqlAggFunction;

Review comment:
       done

##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/AggregateScanConverter.java
##########
@@ -234,4 +237,41 @@ private AggregateCall convertAggCall(
     return AggregateCall.create(
         sqlAggFunction, false, false, false, argList, -1, RelCollations.EMPTY, 
returnType, aggName);
   }
+
+  private SqlAggFunction getBuiltinFunction(ResolvedAggregateFunctionCall 
aggregateFunctionCall) {

Review comment:
       done

##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/BeamZetaSqlCatalog.java
##########
@@ -103,6 +107,7 @@
 
   private final Map<List<String>, UserFunctionDefinitions.JavaScalarFunction> 
javaScalarUdfs =
       new HashMap<>();
+  private final Map<List<String>, Combine.CombineFn<?, ?, ?>> javaUdafs = new 
HashMap<>();

Review comment:
       Nope, this is how it's going to be. For `AggregateFn`, we will convert 
it into a `CombineFn` before storing it here. 




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