[
https://issues.apache.org/jira/browse/HIVE-23228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesus Camacho Rodriguez updated HIVE-23228:
-------------------------------------------
Target Version/s: 4.0.0
> Missed optimization opportunity with equals and not equals
> ----------------------------------------------------------
>
> Key: HIVE-23228
> URL: https://issues.apache.org/jira/browse/HIVE-23228
> Project: Hive
> Issue Type: Improvement
> Components: CBO
> Affects Versions: 4.0.0
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
> Priority: Major
>
> After HIVE-23100 went in, there was a missed opportunity on the
> simplification of an AND predicate containing equals and not equals clause,
> which can be seen in ql/src/test/results/clientpositive/pcs.q.out .
> {code}
> filterExpr: ((key = 3) or (((((ds = '2000-04-08') or key is not
> null) and (key = 2)) or ((ds <> '2000-04-08') and (key = 3))) and ((key + 5)
> > 0))) (type: boolean)
> {code}
> was replaced by:
> {code}
> filterExpr: ((key = 3) or (((((ds = '2000-04-08') or key is not
> null) and (key = 2)) or ((ds <> '2000-04-08') and (key <> 2) and (key = 3)))
> and ((key + 5) > 0))) (type: boolean)
> {code}
> Note the additional {{key <> 2}} in predicate below.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)