如何在不同 table 中使用两列并在运算符之间使用。在蜂巢
how to use two column in different table and use between operator. in hive
我有两个 table 在 Hive 中说 A 和 B。 table A 有 "position" 列,table B 有 "startposition" 和 "endposition" 列。我正在尝试做类似 .
的事情
select * from A where position between (select startposition from B) AND (select endposition from B);
但它不工作并出现异常。
我们怎样才能做到这一点,以便 table A 的每个位置都对照 table B.
的每对开始位置和结束位置进行检查
select
position
from A
join B
where
A.position > B.startposition AND A.position<B.endposition;
我有两个 table 在 Hive 中说 A 和 B。 table A 有 "position" 列,table B 有 "startposition" 和 "endposition" 列。我正在尝试做类似 .
的事情select * from A where position between (select startposition from B) AND (select endposition from B);
但它不工作并出现异常。 我们怎样才能做到这一点,以便 table A 的每个位置都对照 table B.
的每对开始位置和结束位置进行检查select
position
from A
join B
where
A.position > B.startposition AND A.position<B.endposition;