[ 
https://issues.apache.org/jira/browse/IMPALA-15467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Efimov closed IMPALA-15467.
-------------------------------------
    Resolution: Fixed

> Calcite planner: Fix DECIMAL return type inference for IF
> ---------------------------------------------------------
>
>                 Key: IMPALA-15467
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15467
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Aleksandr Efimov
>            Assignee: Aleksandr Efimov
>            Priority: Major
>
> Calcite fails to compile valid IF expressions with DECIMAL branches:
> SELECT IF(TRUE, CAST(1 AS DECIMAL(15,3)), CAST(2 AS DECIMAL(15,3)));
> SELECT IF(TRUE, CAST(1 AS DECIMAL(15,3)), NULL);
> OriginalPlanner compiles both; Calcite reports Unknown type INVALID_TYPE. 
> Reproduced at 2f022a5ca0fc99670bcf197a1f89016cdf78d114 without planner 
> fallback.
> DECIMAL return-type inference incorrectly includes IF's BOOLEAN condition. It 
> should use only the two value branches.
> The candidate fix passes the Java build and 14 related Maven tests, including 
> precision/scale and NULL regressions. Full upstream precommit and E2E are 
> pending.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to