You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "godfrey he (Jira)" <ji...@apache.org> on 2022/01/25 04:36:00 UTC

[jira] [Closed] (FLINK-25171) When the DDL statement was executed, the column names of the Derived Columns were not validated

     [ https://issues.apache.org/jira/browse/FLINK-25171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

godfrey he closed FLINK-25171.
------------------------------
    Fix Version/s: 1.15.0
                   1.14.4
                       (was: 1.14.0)
       Resolution: Fixed

Fixed in 
master: 34de3989a613cf7124f9e301cb8284080f4df4ac
1.14.4: 70acbc591c8c66e82e5fb140f3d49afb0cc107bc

> When the DDL statement was executed, the column names of the Derived Columns were not validated
> -----------------------------------------------------------------------------------------------
>
>                 Key: FLINK-25171
>                 URL: https://issues.apache.org/jira/browse/FLINK-25171
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.14.0
>            Reporter: shouzuo meng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.15.0, 1.14.4
>
>         Attachments: 5261638775663_.pic.jpg
>
>
> When I execute the DDL statement, I mistakenly use the duplicate field name in THE SQL, but the execution result of the program does not throw any exception or prompt. In MergeTableLikeUtilTest. Java# mergePhysicalColumns add repeated the TableColumn (), also do not throw any exceptions, review the code logic found only on the source table schema fields, It is not a duplicate and derived tables and fields of the source table is verified, and no field of derived tables if repeated verification, adding physicalFieldNamesToTypes, there will be a repeating field coverage,The following are the execution statements and the results
> DDL sql:
> CREATE TABLE test1 (
>   `log_version` string COMMENT '日志版本',
>   `log_version` INTEGER COMMENT '日志版本',
>   `pv_time` string COMMENT '日志时间'
> ) with(
>         'connector' = 'kafka',
>         'topic' = 'xxx',
>         'properties.bootstrap.servers' = 'xxx:9110',
>         'scan.startup.mode'='latest-offset',
>         'format' = 'json',
> )
> {code:java}
> StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);
> TableResult result = tEnv.executeSql(
> CREATE TABLE test1 (
>   `log_version` string COMMENT '日志版本',
>   `log_version` INTEGER COMMENT '日志版本',
>   `pv_time` string COMMENT '日志时间'
> ) with(
>         'connector' = 'kafka',
>         'topic' = 'xxx',
>         'properties.bootstrap.servers' = 'xxx:9110',
>         'scan.startup.mode'='latest-offset',
>         'format' = 'json',
> )
> ) 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)