Skip to content

Commit

Permalink
Test joins with dictionary columns in R
Browse files Browse the repository at this point in the history
  • Loading branch information
nealrichardson committed Nov 5, 2021
1 parent 2f42618 commit 8e688d6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions r/tests/testthat/test-dplyr-join.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ skip_if_not_available("dataset")
library(dplyr, warn.conflicts = FALSE)

left <- example_data
# Error: Invalid: Dictionary type support for join output field
# is not yet implemented, output field reference: FieldRef.Name(fct)
# on left side of the join
# (select(-fct) also solves this but remove once)
left$fct <- NULL
left$some_grouping <- rep(c(1, 2), 5)

left_tab <- Table$create(left)
Expand All @@ -37,7 +32,6 @@ to_join <- tibble::tibble(
to_join_tab <- Table$create(to_join)



test_that("left_join", {
expect_message(
compare_dplyr_binding(
Expand Down Expand Up @@ -68,8 +62,6 @@ test_that("left_join `by` args", {
left
)

# TODO: allow renaming columns on the right side as well
skip("ARROW-14184")
compare_dplyr_binding(
.input %>%
rename(the_grouping = some_grouping) %>%
Expand All @@ -82,7 +74,6 @@ test_that("left_join `by` args", {
)
})


test_that("join two tables", {
expect_identical(
left_tab %>%
Expand Down Expand Up @@ -146,6 +137,9 @@ test_that("semi_join", {
test_that("anti_join", {
compare_dplyr_binding(
.input %>%
# Factor levels when there are no rows in the data don't match
# TODO: use better anti_join test data
select(-fct) %>%
anti_join(to_join, by = "some_grouping") %>%
collect(),
left
Expand Down

0 comments on commit 8e688d6

Please sign in to comment.