jonkeane commented on a change in pull request #12113:
URL: https://github.com/apache/arrow/pull/12113#discussion_r830133635
##########
File path: r/tests/testthat/test-dplyr-join.R
##########
@@ -248,6 +247,68 @@ test_that("arrow dplyr query correctly filters then
joins", {
)
})
+test_that("suffix", {
+ left_suf <- Table$create(
+ key = c(1, 2),
+ left_unique = c(2.1, 3.1),
+ shared = c(10.1, 10.3)
+ )
+
+ right_suf <- Table$create(
+ key = c(1, 2, 3, 10, 20),
+ right_unique = c(1.1, 1.2, 3.1, 4.1, 4.3),
+ shared = c(20.1, 30, 40, 50, 60)
+ )
+
+ join_op <- inner_join(left_suf, right_suf, by = "key", suffix = c("_left",
"_right"))
+ output <- collect(join_op)
+ res_col_names <- names(output)
+ expected_col_names <- c("key", "left_unique", "shared_left", "right_unique",
"shared_right")
+ expect_equal(expected_col_names, res_col_names)
+})
+
+test_that("suffix and implicit schema", {
+ left_suf <- Table$create(
+ key = c(1, 2),
+ left_unique = c(2.1, 3.1),
+ shared = c(10.1, 10.3)
+ )
+
+ right_suf <- Table$create(
+ key = c(1, 2, 3, 10, 20),
+ right_unique = c(1.1, 1.2, 3.1, 4.1, 4.3),
+ shared = c(20.1, 30, 40, 50, 60)
+ )
+
+ join_op <- inner_join(left_suf, right_suf, by = "key", suffix = c("_left",
"_right"))
+ output <- collect(join_op)
+ impl_schema <- implicit_schema(join_op)
Review comment:
```suggestion
```
Minor, but I don't think you actually use `impl_schema` below, yeah?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]