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

Jesus Camacho Rodriguez resolved CALCITE-3982.
----------------------------------------------
    Fix Version/s: 1.23.0
       Resolution: Fixed

Fixed in 
[de3bef9b06502886f87b60ab36d8e54ebc55f05c|https://github.com/apache/calcite/commit/de3bef9b06502886f87b60ab36d8e54ebc55f05c].

Thanks [~julianhyde] and [~zabetak] for the feedback.

> Simplify FilterMergeRule to rely on RelBuilder instead of RexProgram
> --------------------------------------------------------------------
>
>                 Key: CALCITE-3982
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3982
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>             Fix For: 1.23.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This could potentially happen since Filter creation has a check on whether 
> the expression is flat 
> ([here|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/core/Filter.java#L74])
>  and Filter merge does not flatten an expression when it is created.
> {noformat}
> java.lang.AssertionError: AND(=($3, 100), OR(OR(null, IS NOT 
> NULL(CAST(100):INTEGER)), =(CAST(100):INTEGER, CAST(200):INTEGER)))
>       at org.apache.calcite.rel.core.Filter.<init>(Filter.java:74)
>       at 
> org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter.<init>(HiveFilter.java:39)
>       at 
> org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelFactories$HiveFilterFactoryImpl.createFilter(HiveRelFactories.java:126)
>       at 
> org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelBuilder.filter(HiveRelBuilder.java:99)
>       at org.apache.calcite.tools.RelBuilder.filter(RelBuilder.java:1055)
>       at 
> org.apache.calcite.rel.rules.FilterMergeRule.onMatch(FilterMergeRule.java:81)
> {noformat}



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

Reply via email to