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 2022/01/21 08:40:00 UTC

[jira] [Updated] (CALCITE-4988) ((A IS NOT NULL OR B) AND A IS NOT NULL) can't be simplify to (A IS NOT NULL) When A is deterministic

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

xiong duan updated CALCITE-4988:
--------------------------------
    Summary: ((A IS NOT NULL OR B) AND A IS NOT NULL) can't be simplify to (A IS NOT NULL) When A is deterministic  (was: ((A IS NOT NULL OR B) AND A IS NOT NULL) can't be simplify to (A IS NOT NULL))

> ((A IS NOT NULL OR B) AND A IS NOT NULL) can't be simplify to (A IS NOT NULL) When A is deterministic
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4988
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4988
>             Project: Calcite
>          Issue Type: Bug
>    Affects Versions: 1.29.0
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Major
>
> Now In Calcite:
> {code:java}
> ((A IS NOT NULL OR B) AND A) can be simplify to (A){code}
> When A is a node representing an input reference or field access.
> For example:
> {code:java}
> (name is null or empid = 1) and name is nul -> name is null{code}
> But When A is a deterministic node, It can't reduce.
> For example:
> {code:java}
> (replace(name,'e','a') is not null or replace(name,'a','c') is not null) 
> and replace(name,'e','a') is not null{code}
> Can't be simplify to:
> {code:java}
> replace(name,'e','a') is not null{code}
> This issue originated in CALCITE-4910.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)