Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

inner join for sub query not working in tez and llap

Highlighted

inner join for sub query not working in tez and llap

New Contributor

I have below query where i do inner join for t1 and t2 sub query. Same query works fine in impala and hive version 1(hortonwork). But it is not working for llap and TEZ. Tables are in ORC format.

If i set hive.execution.engine =mr; then it works without error. I think this query has to do something with TEZ engine.

(NOTE: i try to set many different parameter but never succeeded)

QUERY:

select t1.col1 , t1.ttltest, t2.panetest from ( select col1, sum(col2) ttltest from table1 where year = 2018 and month = 9 and col1 in ('A', 'B', 'C', 'D') group by col1 ) t1 inner join ( select col1, count(distinct id, year, month, day) panetest from table2 where year = 2018 and month = 9 and col1 in ('A', 'B', 'C', 'D') group by col1 ) t2 on t1.col1 = t2.col1;


ERROR:

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Reducer 2, vertexId=vertex_1536278163590_6127_40_02, diagnostics=[Task failed, taskId=task_1536278163590_6127_40_02_000018, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_1536278163590_6127_40_02_000018_0:java.lang.RuntimeException: java.lang.RuntimeException: Hive Runtime Error while closing operators: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=1) {"key":{"_col0":"B","_col1":{0:{"_col0":"A","_col1":2018,"_col2":9,"_col3":1}}},"value":null} at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:218) at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:172)

Don't have an account?
Coming from Hortonworks? Activate your account here