[
https://issues.apache.org/jira/browse/CALCITE-7160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated CALCITE-7160:
------------------------------------
Labels: pull-request-available (was: )
> Simplify AND/OR with DISTINCT predicates to SEARCH
> --------------------------------------------------
>
> Key: CALCITE-7160
> URL: https://issues.apache.org/jira/browse/CALCITE-7160
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.40.0
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.41.0
>
>
> Simplify conjunctions (AND) and disjunctions (OR) with {{IS [NOT] DISTINCT
> FROM}} predicates and literals to {{{}SEARCH{}}}.
> +Example I+
> {noformat}
> OR(IS NOT DISTINCT FROM($0, 10), IS NOT DISTINCT FROM($0, 20))
> SEARCH($0, Sarg[10, 20; NULL AS FALSE])
> {noformat}
> +Example II+
> {noformat}
> AND(IS DISTINCT FROM($0, 10), IS DISTINCT FROM($0, 20))
> SEARCH($0, Sarg[(-∞..10), (10..20), (20..+∞); NULL AS TRUE])
> {noformat}
> These simplifications are not very different to those performed for EQUALS
> (=) and NOT EQUALS (!=) albeit the special null-ability semantics of the
> DISTINCT predicate.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)