'The database has reported an Exception: Query returned non-zero code: 9; 
cause: FAILED' - Queries that have 'JOIN' on tables that have huge data result 
in this exception
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HIVE-2806
                 URL: https://issues.apache.org/jira/browse/HIVE-2806
             Project: Hive
          Issue Type: Bug
    Affects Versions: 0.8.0
            Reporter: Archit Garg
            Priority: Critical


Below are the two queries that result in exception when executed on hive 0.8.0:
1.   SELECT T5.C47 AS C56, ((T5.C48 + T5.C49) - T5.C50) AS C57 FROM (SELECT 
count(T1.b2) AS C47, sum(T2.b2) AS C48, max(T3.e2) AS C49, max(T4.e3) AS C50 
FROM default.qutest2 T1 JOIN default.qutest2 T2 JOIN default.qutest2 T3 JOIN 
default.qutest3 T4 WHERE (((T4.a3 = T3.a2) AND (T3.a2 = T2.a2)) AND (T2.a2 = 
T1.a2))) T5 ORDER BY C56 ASC, C57 DESC;

2.   SELECT  (T5.C43 - T5.C44) AS C58, T5.C45 AS C59, T5.C46 AS C60, T5.C47 AS 
C61 FROM (SELECT sum(T1.a2) AS C43, count(T4.b2) AS C44, count(T1.b2) AS C45, 
sum(T3.b1) AS C46, max(T3.b1) AS C47 FROM default.qutest2 T1 JOIN 
default.qutest2 T2 JOIN default.qutest1 T3 JOIN default.qutest2 T4 WHERE 
(((T4.a2 = T3.a1) AND (T4.a2 = T2.a2)) AND (T4.a2 = T1.a2))) T5 ORDER BY C58 
ASC, C59 ASC, C60 DESC, C61 ASC;


The queries keep on running for a long time ( more than an hour) and finally 
result in exception

The exception is as follows:
Database has reported an Exception: Query returned non-zero code: 9; cause: 
FAILED: Execution Error; return code 2 from 
org.apache.hadoop.hive.ql.exec.MapRedTask (SQLState: 08S01; Vendor code: 9)

Schema of all the tables used is same. All have four columns 
[(INT),(INT),(STRING),(INT)]
For qutest1, columns are a1, b1, d1, e1
For qutest2, columns are a2, b2, d2, e2 [This tables has 1000 rows and has been 
used thrice in JOIN condition in both queries]
For qutest3, columns are a3, b3, d3, e3
For qutest4, columns are a4, b4, d4, e4

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to