如果 Hive 0.9 中的表中有重复项,我希望返回一个布尔值现在,我正在这样做:
select cast(case when count(*) > 0 then 1 else 0 end as smallint) Validate_Value
from (
select guid, count(guid) cnt
from default.vms_feed v
group by guid
) where v.cnt > 1 ;
但这给了我一个错误:
“无法识别'where''v''附近的输入。' 在子查询源 [DB Errorcode=11] "
我不确定我哪里出错了,或者我在这里错过了什么!