You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/19 02:43:50 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #10879: [FLINK-15595][table] Remove CoreMudule in ModuleManager

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:
users@infra.apache.org


With regards,
Apache Git Services