[ 
https://issues.apache.org/jira/browse/CALCITE-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18024138#comment-18024138
 ] 

Mihai Budiu commented on CALCITE-7215:
--------------------------------------

An incorrect plan due to a missed simplification is really a bug somewhere else.
I wouldn't really call this a "major bug". Perhaps a minor feature.


> Simplify SEARCH operand in RexSimplify.simplifySearch
> -----------------------------------------------------
>
>                 Key: CALCITE-7215
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7215
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.41.0
>            Reporter: Soumyakanti Das
>            Assignee: Soumyakanti Das
>            Priority: Major
>              Labels: pull-request-available
>
> 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