JingsongLi commented on a change in pull request #8212: [FLINK-11519][table] Add function related catalog APIs URL: https://github.com/apache/flink/pull/8212#discussion_r278015563
########## File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogFunction.java ########## @@ -0,0 +1,76 @@ +/* + * 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.catalog; + +import java.util.Map; +import java.util.Optional; + +/** + * Interface for a function in a catalog. + */ +public interface CatalogFunction { + + /** + * Get the source of the function. Right now, CLASS only. + * @return the source of the function + */ + default Source getSource() { + return Source.CLASS; + } + + /** + * Get the full name of the class backing the function. + * @return the full name of the class + */ + String getClazzName(); + + /** + * Get the properties of the function. + * @return the properties of the function + */ + Map<String, String> getProperties(); Review comment: Jar URI can be solved by using properties, but I don't think it's good to hide Jar in properties because the Jar definition of Function is a very important thing. In the DDL document: https://docs.google.com/document/d/1TTP-GCC8wSsibJaSUyFZ_5NBAHYEB1FVmPpP7RgDGBA/edit# `CREATE FUNCTION myUDAFunc AS'com. test. myUDAF'LIBRARY myLib;` Function is usually bound to jar. But I think we can look at it later. (After all, we're not dealing with jars yet.) ---------------------------------------------------------------- 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