You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Kurt Young (Jira)" <ji...@apache.org> on 2019/12/14 02:25:00 UTC

[jira] [Updated] (FLINK-15246) Query result schema: [EXPR$0: TIMESTAMP(6) NOT NULL] not equal to TableSink schema: [EXPR$0: TIMESTAMP(3)]

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

Kurt Young updated FLINK-15246:
-------------------------------
    Component/s:     (was: Table SQL / Client)
                 Table SQL / Planner

> Query result schema: [EXPR$0: TIMESTAMP(6) NOT NULL]   not equal to TableSink schema:    [EXPR$0: TIMESTAMP(3)]
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-15246
>                 URL: https://issues.apache.org/jira/browse/FLINK-15246
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.0
>            Reporter: xiaojin.wy
>            Priority: Major
>             Fix For: 1.10.0
>
>
> When I excute the sql below and check the result of it, the "Query result schema" is not equal to the "TableSink schema";
>  
>  
> The sql is:
> CREATE TABLE `t` (
>  x INT
> ) WITH (
>  'format.field-delimiter'=',',
>  'connector.type'='filesystem',
>  'format.derive-schema'='true',
>  'connector.path'='/defender_test_data/daily_regression_batch_spark_1.10/test_case_when_coercion/sources/t.csv',
>  'format.type'='csv'
> );
> SELECT CASE WHEN true THEN cast('2017-12-12 09:30:00.0' as timestamp) ELSE cast(2 as tinyint) END FROM t;
>  
> The exception is:
> org.apache.flink.table.api.ValidationException: Field types of query result and registered TableSink `default_catalog`.`default_database`.`_tmp_table_443938765` do not match. Query result schema: [EXPR$0: TIMESTAMP(6) NOT NULL] TableSink schema: [EXPR$0: TIMESTAMP(3)]
>  
> The input data is:
> 1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)