Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-8758: [R] Updates for compatibility with dplyr 1.0 #7147

Closed
wants to merge 1 commit into from

Conversation

nealrichardson
Copy link
Contributor

I tested this locally with the current version of dplyr on CRAN and the dev version scheduled to be released to CRAN on May 15. Our tests now pass with both versions.

Changes addressed:

  • group_by now requires a character vector of grouping variable names, so now we use group_vars() instead of groups(). group_vars() works in the current dplyr release, so this is a simple change.
  • The argument name in group_by() changed from add to .add, and calling it with the name that works in the current version raises a deprecation warning in dplyr 1.0. The fix here supports both spellings of the argument, and it avoids the warning by determining which version of the internal dplyr function exists and calling the appropriate one.
  • dplyr::transmute() no longer calls dplyr::mutate() internally, so it doesn't just work on Arrow objects anymore. I skipped the one test that called it and left a TODO to add a transmute method.

@github-actions
Copy link

Copy link
Contributor

@romainfrancois romainfrancois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nealrichardson
Copy link
Contributor Author

@github-actions rebase

@nealrichardson nealrichardson deleted the dplyr-1.0 branch May 11, 2020 17:53
kszucs pushed a commit to kszucs/arrow that referenced this pull request May 13, 2020
I tested this locally with the current version of `dplyr` on CRAN and the dev version scheduled to be released to CRAN on May 15. Our tests now pass with both versions.

Changes addressed:

* `group_by` now requires a character vector of grouping variable names, so now we use `group_vars()` instead of `groups()`. `group_vars()` works in the current `dplyr` release, so this is a simple change.
* The argument name in `group_by()` changed from `add` to `.add`, and calling it with the name that works in the current version raises a deprecation warning in dplyr 1.0. The fix here supports both spellings of the argument, and it avoids the warning by determining which version of the internal dplyr function exists and calling the appropriate one.
* `dplyr::transmute()` no longer calls `dplyr::mutate()` internally, so it doesn't just work on Arrow objects anymore. I skipped the one test that called it and left a TODO to add a transmute method.

Closes apache#7147 from nealrichardson/dplyr-1.0

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants