[
https://issues.apache.org/jira/browse/CALCITE-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Soumyakanti Das updated CALCITE-7215:
-------------------------------------
Priority: Minor (was: Major)
> 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: Minor
> 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)