diff options
author | JihongMa <linlin200605@gmail.com> | 2015-11-12 13:47:34 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-11-12 13:47:34 -0800 |
commit | d292f74831de7e69c852ed26d9c15df85b4fb568 (patch) | |
tree | c29b1aed84f549f5295cc0e3cb3b6a508e3360a9 /R/pkg/inst/tests | |
parent | f5a9526fec284cccd0755d190c91e8d9999f7877 (diff) | |
download | spark-d292f74831de7e69c852ed26d9c15df85b4fb568.tar.gz spark-d292f74831de7e69c852ed26d9c15df85b4fb568.tar.bz2 spark-d292f74831de7e69c852ed26d9c15df85b4fb568.zip |
[SPARK-11420] Updating Stddev support via Imperative Aggregate
switched stddev support from DeclarativeAggregate to ImperativeAggregate.
Author: JihongMa <linlin200605@gmail.com>
Closes #9380 from JihongMA/SPARK-11420.
Diffstat (limited to 'R/pkg/inst/tests')
-rw-r--r-- | R/pkg/inst/tests/test_sparkSQL.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/pkg/inst/tests/test_sparkSQL.R b/R/pkg/inst/tests/test_sparkSQL.R index 9e453a1e7c..af024e6183 100644 --- a/R/pkg/inst/tests/test_sparkSQL.R +++ b/R/pkg/inst/tests/test_sparkSQL.R @@ -1007,7 +1007,7 @@ test_that("group by, agg functions", { df3 <- agg(gd, age = "stddev") expect_is(df3, "DataFrame") df3_local <- collect(df3) - expect_equal(0, df3_local[df3_local$name == "Andy",][1, 2]) + expect_true(is.nan(df3_local[df3_local$name == "Andy",][1, 2])) df4 <- agg(gd, sumAge = sum(df$age)) expect_is(df4, "DataFrame") @@ -1038,7 +1038,7 @@ test_that("group by, agg functions", { df7 <- agg(gd2, value = "stddev") df7_local <- collect(df7) expect_true(abs(df7_local[df7_local$name == "ID1",][1, 2] - 6.928203) < 1e-6) - expect_equal(0, df7_local[df7_local$name == "ID2",][1, 2]) + expect_true(is.nan(df7_local[df7_local$name == "ID2",][1, 2])) mockLines3 <- c("{\"name\":\"Andy\", \"age\":30}", "{\"name\":\"Andy\", \"age\":30}", |