I am trying to do UNION ALL for three different tables with same DDL structure but the final output is generating zero rows. I have no clue with what's happening in the underlying execution. Could anybody share your thoughts on this? My sample Hive SQL goes as below. Thank you.
SET hive.execution.engine=tez;
SET hive.exec.dynamic.partition.mode=nonstrict;
SET hive.qubole.cleanup.partial.data.on.failure=true;
SET hive.tez.container.size=8192;
SET tez.task.resource.memory.mb=8192;
SET tez.task.resource.cpu.vcores=2;
SET hive.mapred.mode=nonstrict;
SET hive.qubole.dynpart.use.prefix=true;
SET hive.vectorized.execution.enabled=true;
SET hive.vectorized.execution.reduce.enabled =true;
SET hive.cbo.enable=true;
SET hive.compute.query.using.stats=true;
SET hive.stats.fetch.column.stats=true;
SET hive.stats.fetch.partition.stats=true;
SET mapred.reduce.tasks = -1;
SET hive.auto.convert.join.noconditionaltask.size=2730;
SET hive.auto.convert.join=true;
SET hive.auto.convert.join.noconditionaltask=true;
SET hive.auto.convert.join.noconditionaltask.size=405306368;
SET hive.compute.query.using.stats=true;
SET hive.stats.fetch.column.stats=true;
SET hive.stats.fetch.partition.stats=true;
SET mapreduce.job.reduce.slowstart.completedmaps=0.8;
CREATE TABLE IF NOT EXISTS X STORED AS PARQUET AS
SELECT a,
b,
c
FROM A
UNION ALL
SELECT a,
b,
c
FROM B
UNION ALL
SELECT a,
b,
c
FROM C;
If I try to run the below query on Presto it shows that there is data.
SELECT COUNT(1) FROM
(
SELECT a,
b,
c
FROM A
UNION ALL
SELECT a,
b,
c
FROM B
UNION ALL
SELECT a,
b,
c
FROM C
)Z;