xuefuz commented on a change in pull request #9962: [FLINK-14218][table]
support precise function reference in FunctionCatalog
URL: https://github.com/apache/flink/pull/9962#discussion_r338739229
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java
##########
@@ -345,16 +345,18 @@ public void createFunction(ObjectPath functionPath,
CatalogFunction function, bo
checkNotNull(functionPath);
checkNotNull(function);
- if (!databaseExists(functionPath.getDatabaseName())) {
- throw new DatabaseNotExistException(getName(),
functionPath.getDatabaseName());
+ ObjectPath path = normalize(functionPath);
Review comment:
should we do the normalizatoin in ObjectPath constructor (and any possible
builders) so that we don't have to call normalize(functionPath) in many places?
It will also likely reduce the code diff.
----------------------------------------------------------------
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