[ https://issues.apache.org/jira/browse/IMPALA-13582 ]


    weihua zhang deleted comment on IMPALA-13582:
    ---------------------------------------

was (Author: JIRAUSER307426):
{code:sql}
create table test_type(float_col float, decimal_col DECIMAL(10,2));
insert into test_type values(3.14, 123.45);
select float_col, floor(float_col), decimal_col, floor(decimal_col) from 
test_type;
{code}
calcite's defect, 
https://github.com/apache/calcite/blob/88016c03663647ded44033466c09c57f4b120608/core/src/main/java/org/apache/calcite/sql/SqlUtil.java#L88
{code:sql}
set use_calcite_planner=1;
select float_col, floor(float_col), decimal_col, floor(decimal_col) from 
test_type;
+--------------+--------+-------------+--------+
| float_col    | expr$1 | decimal_col | expr$3 |
+--------------+--------+-------------+--------+
| 3.1400001049 | 3.0    | 123.45      | 123    |
+--------------+--------+-------------+--------+
{code}
{code:sql}
set use_calcite_planner=0;
select float_col, floor(float_col), decimal_col, floor(decimal_col) from 
test_type;
+--------------+------------------+-------------+--------------------+
| float_col    | floor(float_col) | decimal_col | floor(decimal_col) |
+--------------+------------------+-------------+--------------------+
| 3.1400001049 | 3.0              | 123.45      | 123                |
+--------------+------------------+-------------+--------------------+
{code}

> Calcite Planner: return proper labels for columns
> -------------------------------------------------
>
>                 Key: IMPALA-13582
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13582
>             Project: IMPALA
>          Issue Type: Sub-task
>            Reporter: Steve Carlin
>            Assignee: Steve Carlin
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to