Skip to content

Commit 3843395

Browse files
committed
more test
1 parent e440706 commit 3843395

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

R/pkg/R/DataFrame.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3764,7 +3764,7 @@ setMethod("write.stream",
37643764
cols <- NULL
37653765
if (!is.null(partitionBy)) {
37663766
if (!all(sapply(partitionBy, function(c) { is.character(c) }))) {
3767-
stop("all partitionBy column names should be characters")
3767+
stop("All partitionBy column names should be characters.")
37683768
}
37693769
cols <- as.list(partitionBy)
37703770
}

R/pkg/tests/fulltests/test_streaming.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,13 @@ test_that("PartitionBy", {
180180
write.df(df, parquetPath, "parquet", "overwrite")
181181

182182
df <- read.stream(path = parquetPath, schema = stringSchema)
183-
q <- write.stream(df, "json", path = textPath, checkpointLocation = "append", partitionBy = "name")
183+
184+
expect_error(write.stream(df, "json", path = textPath, checkpointLocation = "append",
185+
partitionBy = c(1, 2)),
186+
"All partitionBy column names should be characters")
187+
188+
q <- write.stream(df, "json", path = textPath, checkpointLocation = "append",
189+
partitionBy = "name")
184190
awaitTermination(q, 5 * 1000)
185191
callJMethod(q@ssq, "processAllAvailable")
186192

0 commit comments

Comments
 (0)