sunjincheng121 commented on a change in pull request #7209: 
[FLINK-10977][table] Add UnBounded FlatAggregate operator to streaming Table API
URL: https://github.com/apache/flink/pull/7209#discussion_r244906153
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/table.scala
 ##########
 @@ -367,6 +367,38 @@ class Table(
     groupBy(fieldsExpr: _*)
   }
 
+  /**
+    * Perform a global flatAggregate without groupBy. FlatAggregate takes a 
TableAggregateFunction
+    * which returns multiple rows. Use a selection after the flatAggregate.
+    *
+    * Example:
+    *
+    * {{{
+    *   val tableAggFunc: TableAggregateFunction = new MyTableAggregateFunction
+    *   tab.flatAggregate(tableAggFunc('a, 'b)).select('_1, '_2, '_3)
+    * }}}
+    */
+  def flatAggregate(tableAggCall: TableAggFunctionCall): FlatAggTable = {
+    new FlatAggTable(this, tableAggCall)
+  }
+
+  /**
+    * Perform a global flatAggregate without groupBy. FlatAggregate takes a 
TableAggregateFunction
+    * which returns multiple rows. Use a selection after the flatAggregate.
+    *
+    * Example:
+    *
+    * {{{
+    *   val tableAggFunc: TableAggregateFunction = new MyTableAggregateFunction
+    *   tableEnv.registerFunction("myTableAggFunc", tableAggFunc);
+    *   tab.flatAggregate("myTableAggFunc(a, b)").select("_1, _2, _3")
+    * }}}
+    */
+  def flatAggregate(tableAggCall: String): FlatAggTable = {
+    val call = 
UserDefinedFunctionUtils.createTableAggFunctionCall(this.tableEnv, tableAggCall)
+    new FlatAggTable(this, call)
 
 Review comment:
   flatAggregate(call) ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to