You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "xiong duan (Jira)" <ji...@apache.org> on 2024/10/21 01:38:00 UTC

[jira] [Resolved] (CALCITE-6638) Optimization that simplifies expressions such as '1 > a or 1 <= a or a is null' to TRUE is incorrect when it requires casts that are not lossless

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

xiong duan resolved CALCITE-6638.
---------------------------------
    Resolution: Fixed

> Optimization that simplifies expressions such as '1 > a or 1 <= a or a is null' to TRUE is incorrect when it requires casts that are not lossless
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6638
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6638
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.38.0
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
> Before this PR:
> {code:java}
> // "OR(IS NULL(?0.a), <(1, CAST(?0.a):INTEGER), >=(1, CAST(?0.a):INTEGER))"
> // when (?0.a) is TINYINT
> // ==> "OR(IS NULL(?0.a), <(1, CAST(?0.a):INTEGER), >=(1, CAST(?0.a):INTEGER))" {code}
> After this PR:
> {code:java}
> // "OR(IS NULL(?0.a), <(1, CAST(?0.a):INTEGER), >=(1, CAST(?0.a):INTEGER))"
> // when (?0.a) is TINYINT
> // ==> "TRUE"{code}



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