[
https://issues.apache.org/jira/browse/FLINK-41432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143023#comment-18143023
]
Sergey Nuyanzin commented on FLINK-41432:
-----------------------------------------
Merged as
[365b5037990e8185835897e83ef373dfff520e6d|https://github.com/apache/flink/commit/365b5037990e8185835897e83ef373dfff520e6d]
> Invalid value for materialized-table.default-start-mode fails with
> MissingFormatArgumentException
> -------------------------------------------------------------------------------------------------
>
> Key: FLINK-41432
> URL: https://issues.apache.org/jira/browse/FLINK-41432
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Moritz Manner
> Priority: Minor
> Labels: pull-request-available
>
> If {{materialized-table.default-start-mode}} is set to a start mode that
> needs parameters, for example {{{}FROM_TIMESTAMP{}}}, {{CatalogManager}}
> should throw a {{{}ValidationException{}}}:
>
> {code:java}
> Invalid default start mode 'FROM_TIMESTAMP'. Only parameterless start modes
> are supported as defaults. {code}
> Instead it fails with a {{{}MissingFormatArgumentException{}}}. The message
> has a {{%s}} placeholder, but {{String.format}} is called without an argument
> for it, so the format call fails before the {{ValidationException}} is
> created.
>
> Reproducable by:
> {code:java}
> final EnvironmentSettings settings =
> EnvironmentSettings.newInstance()
> .inBatchMode()
> .withConfiguration(
> Configuration.fromMap(
> Map.of(
>
> "materialized-table.default-start-mode",
> "FROM_TIMESTAMP")))
> .build();
> final TableEnvironment tableEnv = TableEnvironment.create(settings);
> {code}
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)