hequn8128 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_r242069817
##########
File path:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/StreamTableEnvironment.scala
##########
@@ -231,4 +231,20 @@ class StreamTableEnvironment(
: Unit = {
registerAggregateFunctionInternal[T, ACC](name, f)
}
+
+ /**
+ * Registers a [[TableAggregateFunction]] under a unique name in the
TableEnvironment's catalog.
+ * Registered [[TableAggregateFunction]] functions can only be referenced
in Table API.
+ *
+ * @param name The name under which the function is registered.
+ * @param f The TableAggregateFunction to register.
+ * @tparam T The type of the output value.
+ * @tparam ACC The type of aggregate accumulator.
+ */
+ def registerFunction[T: TypeInformation, ACC: TypeInformation](
Review comment:
Yes, it would be good if we reuse it. However, It may not good to expose
`UserDefinedAggregateFunction` to users. Besides, changing to
`UserDefinedAggregateFunction` also makes it capable to register a class that
extends directly from `UserDefinedAggregateFunction` which should be avoided.
----------------------------------------------------------------
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