dawidwys commented on a change in pull request #8661: [FLINK-12711][table]
Separate function implementation and definition
URL: https://github.com/apache/flink/pull/8661#discussion_r294262182
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/UserDefinedFunction.java
##########
@@ -24,11 +24,18 @@
import java.io.Serializable;
/**
- * Base class for all user-defined functions such as scalar functions, table
functions,
- * or aggregation functions.
+ * Base class for all user-defined functions.
+ *
+ * <p>User-defined functions combine the logical definition of a function for
validation and planning
+ * (see {@link UserDefinedFunctionDefinition}) and contain a corresponding
runtime implementation.
+ *
+ * @see ScalarFunction
+ * @see TableFunction
+ * @see AggregateFunction
+ * @see TableAggregateFunction
*/
@PublicEvolving
-public abstract class UserDefinedFunction implements Serializable {
+public abstract class UserDefinedFunction implements
UserDefinedFunctionDefinition, Serializable {
Review comment:
Why the `UserDefinedFunction` extends from the
`UserDefinedFunctionDefinition`? Isn't it an implementation? I think it is the
`ScalarFunctionDefinition`, `TableFunctionDefinition` etc. that should
extend from the `UserDefinedFunctionDefinition`.
As it is implemented now, the method `createImplementation` is never used. I
think it should replace the calls to
`AggregateFunctionDefinition#getAggregateFunction`,
`ScalarFunctionDefinition#getScalarFunction` etc.
----------------------------------------------------------------
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]
With regards,
Apache Git Services