JingsongLi commented on a change in pull request #10879: [FLINK-15595][table] 
Remove CoreMudule in ModuleManager
URL: https://github.com/apache/flink/pull/10879#discussion_r368261218
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
 ##########
 @@ -364,14 +365,22 @@ public void dropTempCatalogFunction(ObjectIdentifier 
identifier, boolean ignoreI
                }
 
                Optional<FunctionDefinition> candidate = 
moduleManager.getFunctionDefinition(normalizedName);
-               ObjectIdentifier oi = ObjectIdentifier.of(
-                       catalogManager.getCurrentCatalog(),
-                       catalogManager.getCurrentDatabase(),
-                       funcName);
 
                return candidate.map(fd ->
                        Optional.of(new Result(FunctionIdentifier.of(funcName), 
fd)
-               )).orElseGet(() -> resolvePreciseFunctionReference(oi));
+               )).orElseGet(() -> {
+                       Optional<Result> precise = 
resolvePreciseFunctionReference(ObjectIdentifier.of(
+                                       catalogManager.getCurrentCatalog(),
+                                       catalogManager.getCurrentDatabase(),
+                                       funcName));
+                       if (precise.isPresent()) {
+                               return precise;
+                       } else {
+                               // last, fallback to core module for table api.
+                               return 
CoreModule.INSTANCE.getFunctionDefinition(funcName)
 
 Review comment:
   Here fallback for table api. Looks not good.

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