[
https://issues.apache.org/jira/browse/HIVE-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616037#comment-13616037
]
Phabricator commented on HIVE-3464:
-----------------------------------
navis has commented on the revision "HIVE-3464 [jira] Merging join tree may
reorder joins which could be invalid".
INLINE COMMENTS
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:6644
Firstly I tried merging in two directions (L to R, R to L) and it's not needed
anymore. Will be removed.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:6614 It's a
bug. HIVE-4212 extended tag value from byte to short, which means it's 16
aliases, not 32 aliases. I'll fix that, too.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:6593
%s/tp/to
REVISION DETAIL
https://reviews.facebook.net/D5409
To: JIRA, navis
Cc: njain, vikram
> Merging join tree may reorder joins which could be invalid
> ----------------------------------------------------------
>
> Key: HIVE-3464
> URL: https://issues.apache.org/jira/browse/HIVE-3464
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 0.10.0
> Reporter: Navis
> Assignee: Navis
> Attachments: HIVE-3464.D5409.2.patch, HIVE-3464.D5409.3.patch,
> HIVE-3464.D5409.4.patch
>
>
> Currently, hive merges join tree from right to left regardless of join types,
> which may introduce join reordering. For example,
> select * from a join a b on a.key=b.key join a c on b.key=c.key join a d on
> a.key=d.key;
> Hive tries to merge join tree in a-d=b-d, a-d=a-b, b-c=a-b order and a-d=a-b
> and b-c=a-b will be merged. Final join tree is "a-(bdc)".
> With this, ab-d join will be executed prior to ab-c. But if join type of -c
> and -d is different, this is not valid.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira