Skip to content

Commit 58b2fa8

Browse files
committed
fixed spelling mistake "charactor"
1 parent cd91f96 commit 58b2fa8

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

R/pkg/R/DataFrame.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,14 +2818,14 @@ setMethod("write.df",
28182818
signature(df = "SparkDataFrame"),
28192819
function(df, path = NULL, source = NULL, mode = "error", ...) {
28202820
if (!is.null(path) && !is.character(path)) {
2821-
stop("path should be charactor, NULL or omitted.")
2821+
stop("path should be character, NULL or omitted.")
28222822
}
28232823
if (!is.null(source) && !is.character(source)) {
28242824
stop("source should be character, NULL or omitted. It is the datasource specified ",
28252825
"in 'spark.sql.sources.default' configuration by default.")
28262826
}
28272827
if (!is.character(mode)) {
2828-
stop("mode should be charactor or omitted. It is 'error' by default.")
2828+
stop("mode should be character or omitted. It is 'error' by default.")
28292829
}
28302830
if (is.null(source)) {
28312831
source <- getDefaultSqlSource()
@@ -3040,7 +3040,7 @@ setMethod("fillna",
30403040
signature(x = "SparkDataFrame"),
30413041
function(x, value, cols = NULL) {
30423042
if (!(class(value) %in% c("integer", "numeric", "character", "list"))) {
3043-
stop("value should be an integer, numeric, charactor or named list.")
3043+
stop("value should be an integer, numeric, character or named list.")
30443044
}
30453045

30463046
if (class(value) == "list") {
@@ -3052,7 +3052,7 @@ setMethod("fillna",
30523052
# Check each item in the named list is of valid type
30533053
lapply(value, function(v) {
30543054
if (!(class(v) %in% c("integer", "numeric", "character"))) {
3055-
stop("Each item in value should be an integer, numeric or charactor.")
3055+
stop("Each item in value should be an integer, numeric or character.")
30563056
}
30573057
})
30583058

@@ -3598,7 +3598,7 @@ setMethod("write.stream",
35983598
"in 'spark.sql.sources.default' configuration by default.")
35993599
}
36003600
if (!is.null(outputMode) && !is.character(outputMode)) {
3601-
stop("outputMode should be charactor or omitted.")
3601+
stop("outputMode should be character or omitted.")
36023602
}
36033603
if (is.null(source)) {
36043604
source <- getDefaultSqlSource()

R/pkg/R/SQLContext.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ tableToDF <- function(tableName) {
606606
#' @note read.df since 1.4.0
607607
read.df.default <- function(path = NULL, source = NULL, schema = NULL, na.strings = "NA", ...) {
608608
if (!is.null(path) && !is.character(path)) {
609-
stop("path should be charactor, NULL or omitted.")
609+
stop("path should be character, NULL or omitted.")
610610
}
611611
if (!is.null(source) && !is.character(source)) {
612612
stop("source should be character, NULL or omitted. It is the datasource specified ",

R/pkg/inst/tests/testthat/test_sparkSQL.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2926,9 +2926,9 @@ test_that("Call DataFrameWriter.save() API in Java without path and check argume
29262926
paste("source should be character, NULL or omitted. It is the datasource specified",
29272927
"in 'spark.sql.sources.default' configuration by default."))
29282928
expect_error(write.df(df, path = c(3)),
2929-
"path should be charactor, NULL or omitted.")
2929+
"path should be character, NULL or omitted.")
29302930
expect_error(write.df(df, mode = TRUE),
2931-
"mode should be charactor or omitted. It is 'error' by default.")
2931+
"mode should be character or omitted. It is 'error' by default.")
29322932
})
29332933

29342934
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
29472947

29482948
# Arguments checking in R side.
29492949
expect_error(read.df(path = c(3)),
2950-
"path should be charactor, NULL or omitted.")
2950+
"path should be character, NULL or omitted.")
29512951
expect_error(read.df(jsonPath, source = c(1, 2)),
29522952
paste("source should be character, NULL or omitted. It is the datasource specified",
29532953
"in 'spark.sql.sources.default' configuration by default."))

0 commit comments

Comments
 (0)