bowenli86 commented on a change in pull request #10327: [FLINK-14914][table]
refactor CatalogFunction by adding Language support
URL: https://github.com/apache/flink/pull/10327#discussion_r351497173
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogFunctionImpl.java
##########
@@ -30,10 +30,17 @@
*/
public class CatalogFunctionImpl implements CatalogFunction {
private final String className; // Fully qualified class name of the
function
+ private final FunctionLanguage functionLanguage;
public CatalogFunctionImpl(String className) {
+ this(className, FunctionLanguage.JAVA);
+ }
+
+ public CatalogFunctionImpl(String className, FunctionLanguage
functionLanguage) {
checkArgument(!StringUtils.isNullOrWhitespaceOnly(className),
"className cannot be null or empty");
+ checkArgument(functionLanguage != null, "functionLanguage
cannot be null");
this.className = className;
+ this.functionLanguage = functionLanguage;
Review comment:
this can be `this.functionLanguage=checkNotNull(functionLanguage,
"functionLanguage cannot be null")`
----------------------------------------------------------------
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