[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.
This commit is contained in:
Brendan Dwyer 2017-04-12 09:24:41 +01:00 committed by Sean Owen
parent bca4259f12
commit 044f7ecbfd
3 changed files with 9 additions and 9 deletions

View file

@ -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()

View file

@ -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 ",

View file

@ -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."))