[
https://issues.apache.org/jira/browse/FLINK-15124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kurt Young updated FLINK-15124:
-------------------------------
Fix Version/s: 1.10.0
> types with precision can't be executed in sql client with blink planner
> -----------------------------------------------------------------------
>
> Key: FLINK-15124
> URL: https://issues.apache.org/jira/browse/FLINK-15124
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Client, Table SQL / Planner
> Affects Versions: 1.10.0
> Reporter: Kurt Young
> Priority: Major
> Fix For: 1.10.0
>
>
> I created a table in sql client with blink planner:
> {noformat}
> create table t (
> a int,
> b varchar,
> c decimal(10, 5))
> with (
> 'connector.type' = 'filesystem',
> 'format.type' = 'csv',
> 'format.derive-schema' = 'true',
> 'connector.path' = 'xxxxxxx'
> );
> {noformat}
> The table description looks good:
> {noformat}
> Flink SQL> describe t;
> root
> |-- a: INT
> |-- b: STRING
> |-- c: DECIMAL(10, 5){noformat}
> But the select query failed:
> {noformat}
> Flink SQL> select * from t;
> [ERROR] Could not execute SQL statement. Reason:
> org.apache.flink.table.planner.codegen.CodeGenException: Incompatible types
> of expression and result type.
> Expression[GeneratedExpression(field$3,isNull$3,,DECIMAL(38, 18),None)] type
> is [DECIMAL(38, 18)], result type is [DECIMAL(10, 5)]
> {noformat}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)