[
https://issues.apache.org/jira/browse/CALCITE-6638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17891368#comment-17891368
]
Mihai Budiu commented on CALCITE-6638:
--------------------------------------
If I understand this right, you are not really implementing this optimization,
but the optimization existed and was incorrect.
If that is true, I would rephrase this JIRA title: So I would probably say
something like "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."
> Simplify '1 > a or 1 <= a or a is null' to TRUE when a has lossless casts
> -------------------------------------------------------------------------
>
> 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)