[
https://issues.apache.org/jira/browse/CALCITE-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497849#comment-17497849
]
Julian Hyde commented on CALCITE-1794:
--------------------------------------
I suspect that the case "$1 <> 3 AND $1 = 5" and others like it are now dealt
with by SARGs (see CALCITE-4173), and no re-ordering of RexNode operands is
necessary. Is that true? And if so, is still necessary to change
{{{}RexSimplify{}}}?
(The test case in {{RexProgramTest}} will not pass, because the expressions in
that test are built using the raw operators "<" and "AND" rather than Sarg, but
the important thing is that queries, which pass through
{{{}SqlToRelConverter{}}}, will get optimized.)
> Simplify AND numeric comparisons when overlapping
> -------------------------------------------------
>
> Key: CALCITE-1794
> URL: https://issues.apache.org/jira/browse/CALCITE-1794
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.29.0
> Reporter: Remus Rusanu
> Assignee: xiong duan
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Expressions such as {{$1<>1 and $1=2}} can be simplified to {{$1=2}}. Similar
> {{$1>10 AND $1>20}} can be simplified to {{$1>20}}. Such expressions are
> produced by the proposed solution for CALCITE-1790 (simplify boolean CASE to
> complex AND/OR).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)