[ 
https://issues.apache.org/jira/browse/HIVE-24334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krisztian Kasa updated HIVE-24334:
----------------------------------
    Description: 
Let assume we have a plan where some Reduce Sink operators has a Join operator 
as input:
{code}
TS[33]-FIL[34]-SEL[35]-RS[42]-JOIN[44]-RS[45]-JOIN[47]
TS[36]-FIL[37]-SEL[38]-RS[43]-JOIN[44]
TS[39]-FIL[40]-SEL[41]-RS[46]-JOIN[47]
{code}
RS[45] inputs is JOIN[44].
When searching for additional opportunities to create additional 
SyntheticJoinPredicates _ExprNodeDescUtils.backtrack_ does not return the input 
expression of the expression in the join operator but the expression itself.
This is caused by
- if the operator is a join operator where we create the join predicate 
derivatives the expression is not resolved
https://github.com/apache/hive/blob/375433510b73c5a22bde4e13485dfc16eaa24706/ql/src/java/org/apache/hadoop/hive/ql/ppd/SyntheticJoinPredicate.java#L400
- later the backtrack algorithm does the resolution of the expression doesn't 
do any iterations since it is already in a terminal state when it is called
https://github.com/apache/hive/blob/375433510b73c5a22bde4e13485dfc16eaa24706/ql/src/java/org/apache/hadoop/hive/ql/ppd/SyntheticJoinPredicate.java#L414

  was:When searching for additional opportunities to create additional 


> SyntheticJoinPredicate creation may be missed when ReduceSink has Join input
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-24334
>                 URL: https://issues.apache.org/jira/browse/HIVE-24334
>             Project: Hive
>          Issue Type: Improvement
>          Components: Physical Optimizer
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>
> Let assume we have a plan where some Reduce Sink operators has a Join 
> operator as input:
> {code}
> TS[33]-FIL[34]-SEL[35]-RS[42]-JOIN[44]-RS[45]-JOIN[47]
> TS[36]-FIL[37]-SEL[38]-RS[43]-JOIN[44]
> TS[39]-FIL[40]-SEL[41]-RS[46]-JOIN[47]
> {code}
> RS[45] inputs is JOIN[44].
> When searching for additional opportunities to create additional 
> SyntheticJoinPredicates _ExprNodeDescUtils.backtrack_ does not return the 
> input expression of the expression in the join operator but the expression 
> itself.
> This is caused by
> - if the operator is a join operator where we create the join predicate 
> derivatives the expression is not resolved
> https://github.com/apache/hive/blob/375433510b73c5a22bde4e13485dfc16eaa24706/ql/src/java/org/apache/hadoop/hive/ql/ppd/SyntheticJoinPredicate.java#L400
> - later the backtrack algorithm does the resolution of the expression doesn't 
> do any iterations since it is already in a terminal state when it is called
> https://github.com/apache/hive/blob/375433510b73c5a22bde4e13485dfc16eaa24706/ql/src/java/org/apache/hadoop/hive/ql/ppd/SyntheticJoinPredicate.java#L414



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to