aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorBrendan Dwyer <brendan.dwyer@ibm.com>2017-04-12 09:24:41 +0100
committerSean Owen <sowen@cloudera.com>2017-04-12 09:24:41 +0100
commit044f7ecbfd75ac5a13bfc8cd01990e195c9bd178 (patch)
tree6df1bea6fc65d2031e94f09eeb6c9796814a8ea4 /R
parentbca4259f12b32eeb156b6755d0ec5e16d8e566b3 (diff)
downloadspark-044f7ecbfd75ac5a13bfc8cd01990e195c9bd178.tar.gz
spark-044f7ecbfd75ac5a13bfc8cd01990e195c9bd178.tar.bz2
spark-044f7ecbfd75ac5a13bfc8cd01990e195c9bd178.zip
[SPARK-20298][SPARKR][MINOR] fixed spelling mistake "charactor"
## What changes were proposed in this pull request? Fixed spelling of "charactor" ## How was this patch tested? Spelling change only Author: Brendan Dwyer <brendan.dwyer@ibm.com> Closes #17611 from bdwyer2/SPARK-20298.
Diffstat (limited to 'R')
-rw-r--r--R/pkg/R/DataFrame.R10
-rw-r--r--R/pkg/R/SQLContext.R2
-rw-r--r--R/pkg/inst/tests/testthat/test_sparkSQL.R6
3 files changed, 9 insertions, 9 deletions
diff --git a/R/pkg/R/DataFrame.R b/R/pkg/R/DataFrame.R
index ec85f723c0..88a138fd8e 100644
--- a/R/pkg/R/DataFrame.R
+++ b/R/pkg/R/DataFrame.R
@@ -2818,14 +2818,14 @@ setMethod("write.df",
signature(df = "SparkDataFrame"),
function(df, path = NULL, source = NULL, mode = "error", ...) {
if (!is.null(path) && !is.character(path)) {
- stop("path should be charactor, NULL or omitted.")
+ stop("path should be character, NULL or omitted.")
}
if (!is.null(source) && !is.character(source)) {
stop("source should be character, NULL or omitted. It is the datasource specified ",
"in 'spark.sql.sources.default' configuration by default.")
}
if (!is.character(mode)) {
- stop("mode should be charactor or omitted. It is 'error' by default.")
+ stop("mode should be character or omitted. It is 'error' by default.")
}
if (is.null(source)) {
source <- getDefaultSqlSource()
@@ -3040,7 +3040,7 @@ setMethod("fillna",
signature(x = "SparkDataFrame"),
function(x, value, cols = NULL) {
if (!(class(value) %in% c("integer", "numeric", "character", "list"))) {
- stop("value should be an integer, numeric, charactor or named list.")
+ stop("value should be an integer, numeric, character or named list.")
}
if (class(value) == "list") {
@@ -3052,7 +3052,7 @@ setMethod("fillna",
# Check each item in the named list is of valid type
lapply(value, function(v) {
if (!(class(v) %in% c("integer", "numeric", "character"))) {
- stop("Each item in value should be an integer, numeric or charactor.")
+ stop("Each item in value should be an integer, numeric or character.")
}
})
@@ -3598,7 +3598,7 @@ setMethod("write.stream",
"in 'spark.sql.sources.default' configuration by default.")
}
if (!is.null(outputMode) && !is.character(outputMode)) {
- stop("outputMode should be charactor or omitted.")
+ stop("outputMode should be character or omitted.")
}
if (is.null(source)) {
source <- getDefaultSqlSource()
diff --git a/R/pkg/R/SQLContext.R b/R/pkg/R/SQLContext.R
index c2a1e240ad..f5c3a749fe 100644
--- a/R/pkg/R/SQLContext.R
+++ b/R/pkg/R/SQLContext.R
@@ -606,7 +606,7 @@ tableToDF <- function(tableName) {
#' @note read.df since 1.4.0
read.df.default <- function(path = NULL, source = NULL, schema = NULL, na.strings = "NA", ...) {
if (!is.null(path) && !is.character(path)) {
- stop("path should be charactor, NULL or omitted.")
+ stop("path should be character, NULL or omitted.")
}
if (!is.null(source) && !is.character(source)) {
stop("source should be character, NULL or omitted. It is the datasource specified ",
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index 58cf24256a..3fbb618ddf 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -2926,9 +2926,9 @@ test_that("Call DataFrameWriter.save() API in Java without path and check argume
paste("source should be character, NULL or omitted. It is the datasource specified",
"in 'spark.sql.sources.default' configuration by default."))
expect_error(write.df(df, path = c(3)),
- "path should be charactor, NULL or omitted.")
+ "path should be character, NULL or omitted.")
expect_error(write.df(df, mode = TRUE),
- "mode should be charactor or omitted. It is 'error' by default.")
+ "mode should be character or omitted. It is 'error' by default.")
})
test_that("Call DataFrameWriter.load() API in Java without path and check argument types", {
@@ -2947,7 +2947,7 @@ test_that("Call DataFrameWriter.load() API in Java without path and check argume
# Arguments checking in R side.
expect_error(read.df(path = c(3)),
- "path should be charactor, NULL or omitted.")
+ "path should be character, NULL or omitted.")
expect_error(read.df(jsonPath, source = c(1, 2)),
paste("source should be character, NULL or omitted. It is the datasource specified",
"in 'spark.sql.sources.default' configuration by default."))