dianfu commented on a change in pull request #8311: [FLINK-10976][table] Add 
Aggregate operator to Table API
URL: https://github.com/apache/flink/pull/8311#discussion_r281000356
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
 ##########
 @@ -1058,4 +1058,39 @@
         * </pre>
         */
        Table flatMap(Expression tableFunction);
+
+       /**
+        * Performs a global aggregate operation with an aggregate function. 
Use this before a selection
+        * to perform the selection operation. The output will be flattened if 
the output type is a
+        * composite type.
+        *
+        * <p>Example:
+        *
+        * <pre>
+        * {@code
+        *   AggregateFunction aggFunc = new MyAggregateFunction()
+        *   tableEnv.registerFunction("aggFunc", aggFunc);
+        *   table.aggregate("aggFunc(a, b) as (f0, f1, f2)")
+        *     .select("key, f0, f1")
 
 Review comment:
   select("f0, f1")?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to