Moritz Manner created FLINK-41432:
-------------------------------------

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


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)

Reply via email to