Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22227#discussion_r214562388
--- Diff: R/pkg/tests/fulltests/test_sparkSQL.R ---
@@ -1803,6 +1803,18 @@ test_that("string operators", {
collect(select(df4, split_string(df4$a, "\\\\")))[1, 1],
list(list("[email protected] 1", "b"))
)
+ expect_equal(
+ collect(select(df4, split_string(df4$a, "\\.", 2)))[1, 1],
+ list(list("a", "[email protected] 1\\b"))
+ )
+ expect_equal(
+ collect(select(df4, split_string(df4$a, "b", -2)))[1, 1],
+ list(list("a.", "@c.d 1\\", ""))
+ )
+ expect_equal(
+ collect(select(df4, split_string(df4$a, "b", 0)))[1, 1],
--- End diff --
I wouldn't add all of those cases for R. One test case to check if they can
be called should be good enough.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]