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

jirapos...@reviews.apache.org commented on HIVE-2337:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1275/
-----------------------------------------------------------

Review request for hive.


Summary
-------

Initial patch


This addresses bug HIVE-2337.
    https://issues.apache.org/jira/browse/HIVE-2337


Diffs
-----

  
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
 1153293 

Diff: https://reviews.apache.org/r/1275/diff


Testing
-------


Thanks,

Charles



> Predicate pushdown erroneously conservative with outer joins
> ------------------------------------------------------------
>
>                 Key: HIVE-2337
>                 URL: https://issues.apache.org/jira/browse/HIVE-2337
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Charles Chen
>            Assignee: Charles Chen
>         Attachments: HIVE-2337v1.patch
>
>
> The predicate pushdown filter is not applying left associativity of joins 
> correctly in determining possible aliases for pushing predicates.
> In hive.ql.ppd.OpProcFactory.JoinPPD.getQualifiedAliases, the criteria for 
> pushing aliases is specified as:
> {noformat}
>     /**
>      * Figures out the aliases for whom it is safe to push predicates based on
>      * ANSI SQL semantics For inner join, all predicates for all aliases can 
> be
>      * pushed For full outer join, none of the predicates can be pushed as 
> that
>      * would limit the number of rows for join For left outer join, all the
>      * predicates on the left side aliases can be pushed up For right outer
>      * join, all the predicates on the right side aliases can be pushed up 
> Joins
>      * chain containing both left and right outer joins are treated as full
>      * outer join. [...]
>      *
>      * @param op
>      *          Join Operator
>      * @param rr
>      *          Row resolver
>      * @return set of qualified aliases
>      */
> {noformat}
> Since hive joins are left associative, something like "a RIGHT OUTER JOIN b 
> LEFT OUTER JOIN cĀ INNER JOIN d" should be interpreted as "((a RIGHT OUTER 
> JOIN b) LEFT OUTER JOIN c) INNER JOIN d", so there would be cases where joins 
> with both left and right outer joins can have aliases that can be pushed.  
> Here, aliases a and d are eligible to be pushed up while the current criteria 
> provide that none are eligible.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to