[
https://issues.apache.org/jira/browse/FLINK-15246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16995550#comment-16995550
]
Jark Wu commented on FLINK-15246:
---------------------------------
Can you verify it using the latest code? I think it should be fixed in
FLINK-15124.
> 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 / Client
> Affects Versions: 1.10.0
> Reporter: xiaojin.wy
> Priority: Major
>
> 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)