xuefuz commented on a change in pull request #8920: [FLINK-13024][table] 
integrate FunctionCatalog with CatalogManager
URL: https://github.com/apache/flink/pull/8920#discussion_r302357374
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/FunctionDefinitionFactory.java
 ##########
 @@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.factories;
+
+import org.apache.flink.table.catalog.CatalogFunction;
+import org.apache.flink.table.functions.FunctionDefinition;
+import org.apache.flink.table.types.DataType;
+
+/**
+ * A factory to create {@link FunctionDefinition} based on string-based 
properties.
+ * See also {@link TableFactory} for more information.
+ */
+public interface FunctionDefinitionFactory extends TableFactory {
+
+       /**
+        * Creates a {@link FunctionDefinition} from given {@link 
CatalogFunction}.
+        *
+        * @param name name of the {@link CatalogFunction}
+        * @param catalogFunction the catalog function
+        * @param constantArguments arguments of a function call (only literal 
arguments
+        *                  are passed, nulls for non-literal ones)
+        * @param argTypes types of arguments
+        * @return a {@link FunctionDefinition}
+        */
+       FunctionDefinition createFunctionDefinition(
+               String name, CatalogFunction catalogFunction, Object[] 
constantArguments, DataType[] argTypes);
 
 Review comment:
   Currently HiveSource/Sink need database name and table name to access Hive 
metastore directly to fetch additional information needed to read/write Hive 
table, which is why HiveTableFactory provides ObjectPath. Note that 
CatalogTable itself doesn't carry over this info.

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

Reply via email to