[jira] [Created] (FLINK-15124) types with precision can't be executed in sql client with blink planner

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-15124) types with precision can't be executed in sql client with blink planner

Shang Yuanchun (Jira)
Kurt Young created FLINK-15124:
----------------------------------

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


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)