我正在尝试对具有相同 DDL 结构的三个不同表执行 UNION ALL,但最终输出生成零行。我不知道底层执行中发生了什么。有人可以分享您对此的想法吗?我的示例 Hive SQL 如下所示。谢谢你。
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;
如果我尝试在 Presto 上运行以下查询,则表明有数据。
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;