[
https://issues.apache.org/jira/browse/CALCITE-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17492314#comment-17492314
]
xiong duan commented on CALCITE-4988:
-------------------------------------
Fixed in
[4a6e222|https://github.com/apache/calcite/commit/4a6e2228c2e2ccf46acb31a0342a1b7d4563e2f6].
Thanks for the review [~VAE] and [~asolimando].
> ((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: 1h 10m
> 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)