Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hive stddev_samp() giving NaN values(double data type) for a set of nulls and decimals

Highlighted

hive stddev_samp() giving NaN values(double data type) for a set of nulls and decimals

Expert Contributor

I have a 24 hour rollup job running which takes a column with decimal data type and does stddev_samp() on it. When all values are NULL's the output is NULL(output datatype is double)

when all values have some values and not nulls, then the output if a value

but when there is a combination of nulls and values when calculating stddev then the output is NaN.

After rollup, the output table is loaded into netezza and we are having issues with NaN values... how can the value stddev be calculated to give an output when there is a combination of nulls and values ?

Don't have an account?
Coming from Hortonworks? Activate your account here