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

Yu Xu updated CALCITE-7657:
---------------------------
    Description: 
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 a 
non-deterministic function, 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.

  was:
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 
non-deterministic function, 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.


> 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 a 
> non-deterministic function, 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