HuangZhenQiu commented on a change in pull request #10294: [FLINK-14913][table] 
refactor CatalogFunction to remove properties
URL: https://github.com/apache/flink/pull/10294#discussion_r349822746
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogFunctionImpl.java
 ##########
 @@ -20,40 +20,36 @@
 
 import org.apache.flink.util.StringUtils;
 
-import java.util.HashMap;
-import java.util.Map;
 import java.util.Optional;
 
 import static org.apache.flink.util.Preconditions.checkArgument;
-import static org.apache.flink.util.Preconditions.checkNotNull;
 
 /**
  * A catalog function implementation.
  */
 public class CatalogFunctionImpl implements CatalogFunction {
        private final String className; // Fully qualified class name of the 
function
-       private final Map<String, String> properties;
+       private final boolean isGeneric;
 
-       public CatalogFunctionImpl(String className, Map<String, String> 
properties) {
+       public CatalogFunctionImpl(String className) {
+               this(className, true);
+       }
+
+       public CatalogFunctionImpl(String className, boolean isGeneric) {
                checkArgument(!StringUtils.isNullOrWhitespaceOnly(className), 
"className cannot be null or empty");
 
                this.className = className;
-               this.properties = checkNotNull(properties, "properties cannot 
be null");
+               this.isGeneric = isGeneric;
 
 Review comment:
   Good suggestion. I think checking whether the class is assignable from 
Flink's udf interfaces is more generic way to handle with it.

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


With regards,
Apache Git Services

Reply via email to