dawidwys commented on a change in pull request #10039: [FLINK-14262][table]
Support referencing function with fully/partially qualified names in SQL
URL: https://github.com/apache/flink/pull/10039#discussion_r343701105
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
##########
@@ -307,9 +306,10 @@ public void dropTempCatalogFunction(ObjectIdentifier
identifier, boolean ignoreI
);
}
- Catalog catalog =
catalogManager.getCatalog(oi.getCatalogName()).get();
+ Optional<Catalog> catalogOptional =
catalogManager.getCatalog(oi.getCatalogName());
- if (catalog != null) {
+ if (catalogOptional.isPresent()) {
Review comment:
nit: This could be simplified further:
```
return catalogOptional
.map(...);
```
I do understand it is independent of the PR. Feel free not to change it in
this PR.
----------------------------------------------------------------
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