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

Mihai Budiu resolved CALCITE-7215.
----------------------------------
    Fix Version/s: 1.41.0
       Resolution: Fixed

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

Thank you for the contribution [~soumyakanti.das] 

 

> Simplify SEARCH operand in RexSimplify.simplifySearch
> -----------------------------------------------------
>
>                 Key: CALCITE-7215
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7215
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.41.0
>            Reporter: Soumyakanti Das
>            Assignee: Soumyakanti Das
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.41.0
>
>
> Currently we do not simplify the SEARCH operand in `simplifySearch`. In Hive 
> we have run into an issue where we were getting incorrect plans because of a 
> missed simplification. 
> For example, we would like 
> {noformat}
> SEARCH(/($0, CASE(CASE(=($0, 1), true, true), 5, null:INTEGER)), Sarg[1, 2, 
> 3]){noformat}
> to be simplified by removing the unnecessary CASEs to
> {noformat}
> SEARCH(/($0, 5), Sarg[1, 2, 3]){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to