【发布时间】:2015-09-12 12:28:21
【问题描述】:
我有两个 Hive 表如下:
Table1:
c1 | c2 | c3
01 | june | true
02 | may | false
Table 2:
c1 | c4
01 | usa
我基本上想了解表 A 和基于 C1 的表之间的区别(wrt 设置操作上下文)。也就是说,我正在查找包含表 1 中但不在表 2 中的 c1 值的所有行。从上面的示例中,我需要从表 1 中获取第二行作为我的查询结果。
我尝试了以下 Hive 查询:
select c1 from table1 a left outer join table2 b
on a.c1 = b.c1 where b.c1 is null
我收到以下错误:
Error while compiling statement: FAILED: SemanticException Column c1 Found in more than One Tables/Subqueries
表 1 和表 2 的第一列都命名为 c1。这是我无法改变的。
这里有什么我遗漏的吗?提前致谢!
【问题讨论】:
标签: hive outer-join hiveql