JingsongLi commented on a change in pull request #10039: [FLINK-14262][table]  
Support referencing function with fully/partially qualified names in SQL
URL: https://github.com/apache/flink/pull/10039#discussion_r343035254
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/catalog/FunctionCatalogOperatorTable.java
 ##########
 @@ -184,4 +188,21 @@ private boolean isNotUserFunction(SqlFunctionCategory 
category) {
        public List<SqlOperator> getOperatorList() {
                throw new UnsupportedOperationException("This should never be 
called");
        }
+
+       public static FunctionIdentifier toFunctionIdentifier(String[] names, 
CatalogManager catalogManager) {
+               return names.length == 1 ?
+                               FunctionIdentifier.of(names[0]) :
+                               FunctionIdentifier.of(
+                                               
catalogManager.qualifyIdentifier(UnresolvedIdentifier.of(names)));
+       }
+
+       public static SqlIdentifier createSqlIdentifier(CallExpression call, 
UserDefinedFunction function) {
 
 Review comment:
   I will create a util class, because functions are not only user define.

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