[
https://issues.apache.org/jira/browse/HIVE-11573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16514489#comment-16514489
]
Gopal V commented on HIVE-11573:
--------------------------------
[~kgyrtkirk]: this was written to prevent algorithmic complexity of the
expression walkers because (a = 1 || a = 2) is actually UDFOr(UDFOpEq(a, 1),
UDFOpEq(a, 2)) while the other one is GenericUDFIn(a, [1,2]) which is faster to
walk through.
The original bad case had 680 (a = 1 and b = 2) or (a=1 and b=3) ... etc, which
got generated as (a=1) and (b=(2,3,...)) and ((a,b) IN ((1,2),(2,3)...) so that
the disjunction could be pushed down to the ORC PPD.
> PointLookupOptimizer can be pessimistic at a low nDV
> ----------------------------------------------------
>
> Key: HIVE-11573
> URL: https://issues.apache.org/jira/browse/HIVE-11573
> Project: Hive
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Gopal V
> Assignee: Gopal V
> Priority: Major
> Fix For: 2.0.0
>
> Attachments: HIVE-11573.1.patch, HIVE-11573.2.patch,
> HIVE-11573.3.patch, HIVE-11573.4.patch, HIVE-11573.5.patch, HIVE-11573.6.patch
>
>
> The PointLookupOptimizer can turn off some of the optimizations due to its
> use of tuple IN() clauses.
> Limit the application of the optimizer for very low nDV cases and extract the
> sub-clause as a pre-condition during runtime, to trigger the simple column
> predicate index lookups.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)