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/04/23 15:14:44 UTC

[GitHub] [flink] dianfu commented on a change in pull request #11884: [FLINK-17345][python][table] Support register and get Python UDF in Catalog.

dianfu commented on a change in pull request #11884:
URL: https://github.com/apache/flink/pull/11884#discussion_r413879591



##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
##########
@@ -194,22 +194,32 @@ public void registerCatalogFunction(
 			UnresolvedIdentifier unresolvedIdentifier,
 			Class<? extends UserDefinedFunction> functionClass,
 			boolean ignoreIfExists) {
-		final ObjectIdentifier identifier = catalogManager.qualifyIdentifier(unresolvedIdentifier);
-		final ObjectIdentifier normalizedIdentifier = FunctionIdentifier.normalizeObjectIdentifier(identifier);
 
 		try {
 			UserDefinedFunctionHelper.validateClass(functionClass);
 		} catch (Throwable t) {
 			throw new ValidationException(
 				String.format(
 					"Could not register catalog function '%s' due to implementation errors.",
-					identifier.asSummaryString()),
+					catalogManager.qualifyIdentifier(unresolvedIdentifier).asSummaryString()),
 				t);
 		}
 
-		final Catalog catalog = catalogManager.getCatalog(normalizedIdentifier.getCatalogName())
-			.orElseThrow(IllegalStateException::new);
-		final ObjectPath path = identifier.toObjectPath();
+		final CatalogFunction catalogFunction = new CatalogFunctionImpl(

Review comment:
       Could you explain the aim of this change? It seems to me there is no difference between the changed logic and the original logic.




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