Hadoop 配置单元:断言/测试两列始终包含相同的值
我想检查我的配置单元表中具有相同类型的两列是否始终具有相同的值(可能对于子集) 有人,但我不认为这是决定性的回答那里。我基本上是在寻找一个Hadoop 配置单元:断言/测试两列始终包含相同的值,hadoop,hive,hiveql,Hadoop,Hive,Hiveql,我想检查我的配置单元表中具有相同类型的两列是否始终具有相同的值(可能对于子集) 有人,但我不认为这是决定性的回答那里。我基本上是在寻找一个sum(col==col2)类型语义 select sum(case when !(col1=col2 ) then 1 else 0 end) as sum_not_equal from (select 20 col1, 20 col2 union all select 10 col1, 10 col2 )s 或 count(case when !(c
sum(col==col2)
类型语义
select sum(case when !(col1=col2 ) then 1 else 0 end) as sum_not_equal
from
(select 20 col1, 20 col2
union all
select 10 col1, 10 col2
)s
或
count(case when !(col1=col2 ) then 1 end)