Yu Xu created CALCITE-7657:
------------------------------
Summary: 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
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)