STDDEV_SAMP and VAR_SAMP

Learn about the changes introduced to ensure that the STDDEV_SAMP and VAR_SAMP built-in aggregate functions (UDAFs) are in compliance with the SQL:2011 standards.

Before upgrade to CDP

The STDDEV_SAMP and VAR_SAMP aggregate functions were not in compliance with SQL:2011 standards and returns '0' when the function is applied to a set with a single element. The functions are expected to return NULL.

After upgrade to CDP

HIVE-17375 fixes the issue and ensures that these functions comply with SQL:2011 standards. The functions now return NULL when they are applied to either an empty set or a set with a single element.