xuefuz commented on a change in pull request #9979: [FLINK-14417][table] 
Develop CoreModule to provide Flink built-in functions
URL: https://github.com/apache/flink/pull/9979#discussion_r338758968
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
 ##########
 @@ -267,17 +266,8 @@ public void 
registerTempCatalogScalarFunction(ObjectIdentifier oi, ScalarFunctio
                if (userCandidate != null) {
                        foundDefinition = Optional.of(userCandidate);
                } else {
-
-                       // TODO once we connect this class with the Catalog 
APIs we need to make sure that
-                       //  built-in functions are present in "root" built-in 
catalog. This allows to
-                       //  overwrite built-in functions but also fallback to 
the "root" catalog. It should be
-                       //  possible to disable the "root" catalog if that is 
desired.
-
-                       foundDefinition = 
BuiltInFunctionDefinitions.getDefinitions()
-                               .stream()
-                               .filter(f -> 
functionName.equals(normalizeName(f.getName())))
-                               .findFirst()
-                               .map(Function.identity());
+                       foundDefinition = moduleManager.getFunctionDefinition(
+                               
FunctionCatalogUtil.normalizeName(functionName));
 
 Review comment:
   functionName seems already being normalized above. do we need to do it again?

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