Resolution: Won't Fix
Affects Version/s: None
Fix Version/s: None
Component/s: Query Processor
Some of the current aggregates (sum, avg) have a fairly standard behavior: If any item in the list is NULL, the sum, average, etc., cannot be computed. And so, NULL is returned.
1) If this is the case, the query should return much faster--see a null, return NULL, exit(0).
2) It would be nice to have versions or ways to use these functions with NULL data--specifically, to treat the NULL as zero or to ignore the NULL and return the results for non-NULL data.
This also would apply to the variance functions referenced in https://issues.apache.org/jira/browse/HIVE-165
|Field||Original Value||New Value|
|Issue Type||Wish [ 5 ]||Bug [ 1 ]|
|Component/s||Clients [ 12312587 ]|
|Summary||avg() returns null if any item in the list is null; create function that doesn't||avg() ignores null values; consider variant that doesn't|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Won't Fix [ 2 ]|