[
https://issues.apache.org/jira/browse/FLINK-32044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ran Tao updated FLINK-32044:
----------------------------
Summary: Improve catalog name check to keep consistent about human-readable
exception log in FunctionCatalog (was: Impove catalog name check to keep
consistent about human-readable exception log in FunctionCatalog )
> Improve catalog name check to keep consistent about human-readable exception
> log in FunctionCatalog
> ----------------------------------------------------------------------------------------------------
>
> Key: FLINK-32044
> URL: https://issues.apache.org/jira/browse/FLINK-32044
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: 1.17.0
> Reporter: Ran Tao
> Priority: Major
> Labels: pull-request-available
>
> {code:java}
> Catalog catalog = catalogManager.getCatalog(catalogName).get(); {code}
>
> -->
>
> {code:java}
> Catalog catalog =
> catalogManager
> .getCatalog(catalogName)
> .orElseThrow(
> () ->
> new ValidationException(
> String.format(
> "Catalog %s not exists.",
> catalogName)));{code}
> A trivial improvement to check optional#get and throw more friendly log to
> users.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)