You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2018/06/15 23:19:00 UTC

[jira] [Comment Edited] (HIVE-11573) PointLookupOptimizer can be pessimistic at a low nDV

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

Gopal V edited comment on HIVE-11573 at 6/15/18 11:18 PM:
----------------------------------------------------------

[~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 x (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.


was (Author: gopalv):
[~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)