You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/10 09:22:47 UTC

[GitHub] [flink] sunjincheng121 commented on a change in pull request #8359: [FLINK-11051][table] Add streaming window FlatAggregate to Table API

sunjincheng121 commented on a change in pull request #8359: [FLINK-11051][table] Add streaming window FlatAggregate to Table API
URL: https://github.com/apache/flink/pull/8359#discussion_r282715615
 
 

 ##########
 File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/WindowGroupedTable.java
 ##########
 @@ -54,4 +54,39 @@
 	 * </pre>
 	 */
 	Table select(Expression... fields);
+
+	/**
+	 * Performs a flatAggregate operation on a window grouped table. FlatAggregate takes a
+	 * TableAggregateFunction which returns multiple rows. Use a selection after flatAggregate.
+	 *
+	 * <p>Example:
+	 *
+	 * <pre>
+	 * {@code
+	 *   TableAggregateFunction tableAggFunc = new MyTableAggregateFunction
+	 *   tableEnv.registerFunction("tableAggFunc", tableAggFunc);
+	 *   windowGroupedTable
+	 *     .flatAggregate("tableAggFunc(a, b) as (x, y, z)")
+	 *     .select("key, window.start, x, y, z")
+	 * }
+	 * </pre>
+	 */
+	FlatAggregateTable flatAggregate(String tableAggregateFunction);
 
 Review comment:
   
   We should add the JavaDoc for `WindowGroupedTable` in `FlatAggregateTable`. e.g.:
   A table that performs flatAggregate on a {@link Table}, a {@link GroupedTable} or a {@link WndowGroupedTable}. 

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


With regards,
Apache Git Services