You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ryan Pridgeon (JIRA)" <ji...@apache.org> on 2014/11/13 15:20:34 UTC
[jira] [Created] (HIVE-8856) Multiple joins must have conditionals
in same order
Ryan Pridgeon created HIVE-8856:
-----------------------------------
Summary: Multiple joins must have conditionals in same order
Key: HIVE-8856
URL: https://issues.apache.org/jira/browse/HIVE-8856
Project: Hive
Issue Type: Bug
Reporter: Ryan Pridgeon
SELECT
COUNT(*)
FROM
TBL_A,TBL_B,TBL_C
WHERE
A.key1 = B.key1 AND A.key2 = B.key2
AND
A.key2 = C.key2 AND A.Key1 = B.key1
Where key1 is a string and key2 is a double.
Note: This effects explicit joins as well
A look at the query plan reveals the following:
Map Join Operator
condition map:
Inner Join 0 to 1
Inner Join 0 to 2
condition expressions:
0 {prdct_id} {bu_cd}
1 {prdct_id} {bu_cd}
2 {prdct_id} {bu_cd}
keys:
0 UDFToDouble(prdct_id) (type: double), bu_cd (type: double)
1 UDFToDouble(prdct_id) (type: double), bu_cd (type: double)
2 bu_cd (type: double), UDFToDouble(prdct_id) (type: double)
The ordering of keys within a join should not dictate it's type. This is something the query optimizer should handle prior to making the plan. This way users do not have to worry about ordrering their conditionals. At the very least it should fail, instead it silently converts them to nulls and returns 0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)