【发布时间】:2019-11-07 17:11:46
【问题描述】:
我有一个表,在一个双字段中包含“NaN”。我只是想计算有多少项目是“NaN”:
Select count(*) from table
where col = 'NaN'
AnalysisException:DOUBLE 和 STRING 类型的操作数不可比较:col = 'NaN'
Select count(*) from table
where col is null
Result = 0(顺便说一句,此列中有大量 NaN 记录)
Select count(*) from table
where cast(col as string) = 'NaN'
结果 = 0
如何在实际计算 NaN 行的情况下执行此操作?
【问题讨论】: