aboutsummaryrefslogtreecommitdiff
path: root/R/pkg
diff options
context:
space:
mode:
authorHerman van Hovell <hvanhovell@databricks.com>2016-11-01 17:30:37 +0100
committerHerman van Hovell <hvanhovell@databricks.com>2016-11-01 17:30:37 +0100
commit0cba535af3c65618f342fa2d7db9647f5e6f6f1b (patch)
tree5b16f0dd27997083403ef7c621c001e615189e2a /R/pkg
parent5441a6269e00e3903ae6c1ea8deb4ddf3d2e9975 (diff)
downloadspark-0cba535af3c65618f342fa2d7db9647f5e6f6f1b.tar.gz
spark-0cba535af3c65618f342fa2d7db9647f5e6f6f1b.tar.bz2
spark-0cba535af3c65618f342fa2d7db9647f5e6f6f1b.zip
Revert "[SPARK-16839][SQL] redundant aliases after cleanupAliases"
This reverts commit 5441a6269e00e3903ae6c1ea8deb4ddf3d2e9975.
Diffstat (limited to 'R/pkg')
-rw-r--r--R/pkg/inst/tests/testthat/test_sparkSQL.R12
1 files changed, 6 insertions, 6 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index 5002655fc0..9289db57b6 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -1222,16 +1222,16 @@ test_that("column functions", {
# Test struct()
df <- createDataFrame(list(list(1L, 2L, 3L), list(4L, 5L, 6L)),
schema = c("a", "b", "c"))
- result <- collect(select(df, alias(struct("a", "c"), "d")))
+ result <- collect(select(df, struct("a", "c")))
expected <- data.frame(row.names = 1:2)
- expected$"d" <- list(listToStruct(list(a = 1L, c = 3L)),
- listToStruct(list(a = 4L, c = 6L)))
+ expected$"struct(a, c)" <- list(listToStruct(list(a = 1L, c = 3L)),
+ listToStruct(list(a = 4L, c = 6L)))
expect_equal(result, expected)
- result <- collect(select(df, alias(struct(df$a, df$b), "d")))
+ result <- collect(select(df, struct(df$a, df$b)))
expected <- data.frame(row.names = 1:2)
- expected$"d" <- list(listToStruct(list(a = 1L, b = 2L)),
- listToStruct(list(a = 4L, b = 5L)))
+ expected$"struct(a, b)" <- list(listToStruct(list(a = 1L, b = 2L)),
+ listToStruct(list(a = 4L, b = 5L)))
expect_equal(result, expected)
# Test encode(), decode()