Github user wzhfy commented on a diff in the pull request:
https://github.com/apache/spark/pull/19438#discussion_r143348208
--- Diff: R/pkg/tests/fulltests/test_sparkSQL.R ---
@@ -2738,7 +2738,7 @@ test_that("sampleBy() on a DataFrame", {
})
test_that("approxQuantile() on a DataFrame", {
- l <- lapply(c(0:99), function(i) { list(i, 99 - i) })
+ l <- lapply(c(1:100), function(i) { list(i, 101 - i) })
--- End diff --
For data 0-99, before this pr, the 0.5 percentile is 50, after this pr, the
percentile is 49. Both 49 and 50 is correct answer as 0.5 percentile for 0-99.
So we can fix the test by either change data to 1-100, or change the
expected percentile to 49 if data unchanged (0-99).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]