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/02/14 06:18:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17491809#comment-17491809 ]
xiong duan commented on CALCITE-4988:
-------------------------------------
The PR is ready. Welcome everyone to review.
> ((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
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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)