[ 
https://issues.apache.org/jira/browse/IMPALA-13582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17965206#comment-17965206
 ] 

weihua zhang edited comment on IMPALA-13582 at 6/12/25 3:13 AM:
----------------------------------------------------------------

{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
{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}




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}
{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