GH-14734: [R] Deprecated filter + across usage - #51235
Open
thisisnic wants to merge 1 commit into
Open
Conversation
|
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The warning behavior is implemented consistently with existing Arrow R deprecation patterns and is covered by targeted testthat expectations.
Pull request overview
This PR aligns Arrow R’s dplyr backend with dplyr’s deprecation of using across() inside filter() by emitting a lifecycle-style deprecation warning (also applied to Arrow’s filter_out() helper).
Changes:
- Detect
across()calls passed tofilter()/filter_out()and emit alifecycle_warning_deprecatedwarning (rate-limited viarlang::warn(.frequency = "regularly")). - Add test coverage asserting the warning message and class for both
filter()andfilter_out().
File summaries
| File | Description |
|---|---|
| r/R/dplyr-filter.R | Adds deprecation warning when across() is used as a filter()/filter_out() predicate, then proceeds with existing expand_across() behavior. |
| r/tests/testthat/test-dplyr-filter.R | Adds tests verifying the warning message and warning class for filter(across(...)) and filter_out(across(...)). |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Wanna match deprecation of functions that dplyr has
What changes are included in this PR?
Warn when using across i filter
Are these changes tested?
Yeah
Are there any user-facing changes?
Yeah