【发布时间】:2021-04-13 07:32:18
【问题描述】:
我正在使用 Hive 2.3.5 Spark 2.3.3 版
当我在 hive 上运行以下查询时,它失败了..saying 试图扫描太多分区。
select t1.A, t2.B
from t1 left join t2 on t1.x = t2.x
where t1.x = 'abc'
vs 当我运行它时,它工作正常:
select t1.A, t2.B
from t1 left join t2 on t1.x = t2.x
where t1.x = 'abc'
and t2.x = 'abc'
当我已经在 t1.x = t2.x 上进行连接时,为什么我需要再次在表 t2 上传递显式过滤器 (t2.x='abc') 其中 t1.x = 'abc'?
普通连接可以正常工作,不需要额外的过滤器,但不要让连接
【问题讨论】:
标签: sql apache-spark hive left-join hiveql