jjzjj

tblAliasCnt

全部标签

sql - 使用 between operator 的 Hive 不等式连接

我们有一个类似于下面的查询:(partition_date是我们的表分区)SELECT*FROMAJOINBwherepartition_date>B.last_runtime;我们意识到通过将条件放在where子句中会导致全表扫描,因此我们需要将其作为ON放在JOIN中。问题是Hive不支持不等式连接,所以考虑使用如下所示的BETWEEN运算符:Select*fromAJOINBONpar_datebetweenB.last_runtimeand'99999999';thisisgivingustheerror:Bothleftandrightaliasesencounteredin