diff options
author | Venkata Ramana Gollamudi <ramana.gollamudi@huawei.com> | 2015-03-21 13:24:24 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-03-21 13:24:24 -0700 |
commit | ee569a0c7171d149eee52877def902378eaf695e (patch) | |
tree | 7f33dac98678ed3aaa46979dbcdb2afe0aa23409 /sql/hive/compatibility/src/test/scala | |
parent | 52dd4b2b277eb48bc89db9b21d25f5e836c1d348 (diff) | |
download | spark-ee569a0c7171d149eee52877def902378eaf695e.tar.gz spark-ee569a0c7171d149eee52877def902378eaf695e.tar.bz2 spark-ee569a0c7171d149eee52877def902378eaf695e.zip |
[SPARK-5680][SQL] Sum function on all null values, should return zero
SELECT sum('a'), avg('a'), variance('a'), std('a') FROM src;
Should give output as
0.0 NULL NULL NULL
This fixes hive udaf_number_format.q
Author: Venkata Ramana G <ramana.gollamudihuawei.com>
Author: Venkata Ramana Gollamudi <ramana.gollamudi@huawei.com>
Closes #4466 from gvramana/sum_fix and squashes the following commits:
42e14d1 [Venkata Ramana Gollamudi] Added comments
39415c0 [Venkata Ramana Gollamudi] Handled the partitioned Sum expression scenario
df66515 [Venkata Ramana Gollamudi] code style fix
4be2606 [Venkata Ramana Gollamudi] Add udaf_number_format to whitelist and golden answer
330fd64 [Venkata Ramana Gollamudi] fix sum function for all null data
Diffstat (limited to 'sql/hive/compatibility/src/test/scala')
-rw-r--r-- | sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala index 5180a7f09d..2ae9d018e1 100644 --- a/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala +++ b/sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala @@ -800,6 +800,7 @@ class HiveCompatibilitySuite extends HiveQueryFileTest with BeforeAndAfter { "udaf_covar_pop", "udaf_covar_samp", "udaf_histogram_numeric", + "udaf_number_format", "udf2", "udf5", "udf6", |