You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/11/22 22:22:12 UTC

[GitHub] [flink] bowenli86 commented on a change in pull request #10294: [FLINK-14913][table] refactor CatalogFunction to remove properties

bowenli86 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_r349817978
 
 

 ##########
 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:
   felt like `isGeneric` can be automatically determined by checking if the class of `className` is assignable from Flink's udf interfaces? or it can even take a class as constructor param

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


With regards,
Apache Git Services