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

Chunwei Lei resolved CALCITE-3544.
----------------------------------
    Fix Version/s: 1.22.0
       Resolution: Fixed

Fixed in 
[ab136b5f76a4cb951e847fcba6b414c5e80dbbe6|https://github.com/apache/calcite/commit/ab136b5f76a4cb951e847fcba6b414c5e80dbbe6].
 Thanks for your reivew, [~vladimirsitnikov]  and  [~danny0405].

> RexSimplify does not exploit all known predicates
> -------------------------------------------------
>
>                 Key: CALCITE-3544
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3544
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.21.0
>            Reporter: Chunwei Lei
>            Assignee: Chunwei Lei
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When there are multiple predicates in RexSimplify, only the first predicates 
> will be used to simplify the RexNode. The following test can reproduce.
> {code:java}
> // RexProgramTest.java
> @Test public void testSimplifyRangeWithMultiPredicates() {
>   final RexNode ref = input(tInt(), 0);
>   RelOptPredicateList relOptPredicateList = RelOptPredicateList.of(rexBuilder,
>       ImmutableList.of(gt(ref, literal(1)), le(ref, literal(5))));
>   checkSimplifyFilter(gt(ref, literal(9)), relOptPredicateList, "false");
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to