[ 
https://issues.apache.org/jira/browse/CALCITE-7657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18096447#comment-18096447
 ] 

Yu Xu commented on CALCITE-7657:
--------------------------------

I plan to refine this in the near future if there are no objections.

> Apply the absorption law to simplify boolean expressions
> --------------------------------------------------------
>
>                 Key: CALCITE-7657
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7657
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Yu Xu
>            Assignee: Yu Xu
>            Priority: Major
>             Fix For: 1.43.0
>
>
> RexSimplify did not apply the boolean absorption law, leaving redundant 
> expressions such as:
> {code:java}
> a AND (a OR b) 
> a OR (a AND b)  {code}
> un-simplified(both case above should simplified to a), of course 
> deterministic types, such as the `rand` function—do not need to be 
> simplified. 
> This prevented the optimizer from removing obviously redundant sub-conditions 
> in WHERE / FILTER / JOIN predicates, resulting in more complex expressions 
> and execution plans than necessary.
> We might be able to optimize this.



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

Reply via email to