diff options
author | hyukjinkwon <gurwls223@gmail.com> | 2017-04-17 09:04:24 -0700 |
---|---|---|
committer | Felix Cheung <felixcheung@apache.org> | 2017-04-17 09:04:24 -0700 |
commit | 24f09b39c7b947e52fda952676d5114c2540e732 (patch) | |
tree | c44e855041a0cea70c4fccc05627945acfce2a56 /R/pkg/inst/tests | |
parent | 86d251c58591278a7c88745a1049e7a41db11964 (diff) | |
download | spark-24f09b39c7b947e52fda952676d5114c2540e732.tar.gz spark-24f09b39c7b947e52fda952676d5114c2540e732.tar.bz2 spark-24f09b39c7b947e52fda952676d5114c2540e732.zip |
[SPARK-19828][R][FOLLOWUP] Rename asJsonArray to as.json.array in from_json function in R
## What changes were proposed in this pull request?
This was suggested to be `as.json.array` at the first place in the PR to SPARK-19828 but we could not do this as the lint check emits an error for multiple dots in the variable names.
After SPARK-20278, now we are able to use `multiple.dots.in.names`. `asJsonArray` in `from_json` function is still able to be changed as 2.2 is not released yet.
So, this PR proposes to rename `asJsonArray` to `as.json.array`.
## How was this patch tested?
Jenkins tests, local tests with `./R/run-tests.sh` and manual `./dev/lint-r`. Existing tests should cover this.
Author: hyukjinkwon <gurwls223@gmail.com>
Closes #17653 from HyukjinKwon/SPARK-19828-followup.
Diffstat (limited to 'R/pkg/inst/tests')
-rw-r--r-- | R/pkg/inst/tests/testthat/test_sparkSQL.R | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R index 3fbb618ddf..6a6c9a809a 100644 --- a/R/pkg/inst/tests/testthat/test_sparkSQL.R +++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R @@ -1454,7 +1454,7 @@ test_that("column functions", { jsonArr <- "[{\"name\":\"Bob\"}, {\"name\":\"Alice\"}]" df <- as.DataFrame(list(list("people" = jsonArr))) schema <- structType(structField("name", "string")) - arr <- collect(select(df, alias(from_json(df$people, schema, asJsonArray = TRUE), "arrcol"))) + arr <- collect(select(df, alias(from_json(df$people, schema, as.json.array = TRUE), "arrcol"))) expect_equal(ncol(arr), 1) expect_equal(nrow(arr), 1) expect_is(arr[[1]][[1]], "list") |