Skip to content

Commit

Permalink
[SPARKR][BRANCH-2.0] R merge API doc and example fix
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

Fixes for R doc

## How was this patch tested?

N/A

Author: Felix Cheung <[email protected]>

Closes apache#15589 from felixcheung/rdocmergefix.

(cherry picked from commit 0e0d83a)
Signed-off-by: Felix Cheung <[email protected]>
  • Loading branch information
felixcheung authored and Felix Cheung committed Oct 23, 2016
1 parent a81fba0 commit 3a423f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/pkg/R/DataFrame.R
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ setMethod("colnames<-",

# Check if the column names have . in it
if (any(regexec(".", value, fixed = TRUE)[[1]][1] != -1)) {
stop("Colum names cannot contain the '.' symbol.")
stop("Column names cannot contain the '.' symbol.")
}

sdf <- callJMethod(x@sdf, "toDF", as.list(value))
Expand Down
2 changes: 1 addition & 1 deletion R/pkg/inst/tests/testthat/test_sparkSQL.R
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ test_that("names() colnames() set the column names", {
expect_equal(names(df)[1], "col3")

expect_error(colnames(df) <- c("sepal.length", "sepal_width"),
"Colum names cannot contain the '.' symbol.")
"Column names cannot contain the '.' symbol.")
expect_error(colnames(df) <- c(1, 2), "Invalid column names.")
expect_error(colnames(df) <- c("a"),
"Column names must have the same length as the number of columns in the dataset.")
Expand Down

0 comments on commit 3a423f5

Please sign in to comment.