GH-49534: [R] Implement dplyr recode_values(), replace_values(), and replace_when()#49536
GH-49534: [R] Implement dplyr recode_values(), replace_values(), and replace_when()#49536thisisnic merged 25 commits intoapache:mainfrom
Conversation
f8ecb8f to
880b775
Compare
jonkeane
left a comment
There was a problem hiding this comment.
The tests look good, and so long as CI doesn't bonk I'm good with shipping this. I do think we should keep the validation error when being given a vectorized .default though.
| "`.default` must have size 1, not size 2", | ||
| class = "validation_error" | ||
| "`case_when\\(\\)` with vectorized `.default` not supported in Arrow", | ||
| class = "arrow_not_supported" |
There was a problem hiding this comment.
I'm not totally sure I think we should make this change. The original message is clearer to me about what needs to happen. I also don't mind that it's a validation_error since that is what it is.
There was a problem hiding this comment.
Good shout on the contents of the error message, will update to be more recommendationy!
I'm not sure about the type of error though - my reasoning here was that it's a feature which is supported in dplyr but not arrow, which is where we typically use arrow_not_supported, whereas validation_error is more for things that fail in both. I guess it's tricky when size isn't either length 1 or the same length as the input, as then it's wrong in both, but in the bindings for str_sub/substr we use arrow_not_supported.
There was a problem hiding this comment.
Ok, that's fair. I'm ok with arrow_not_supported + the clearer message about number of arguments
|
@github-actions crossbow submit -g r |
|
Revision: 825940b Submitted crossbow builds: ursacomputing/crossbow @ actions-40f5a339fc |
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
707bf62 to
bbb4113
Compare
|
@github-actions crossbow submit -g r |
|
Revision: bbb4113 Submitted crossbow builds: ursacomputing/crossbow @ actions-29b827672d |
|
CI failure appears to be unrelated (duckddb installation) so I'll merge |
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit bb4e492. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
Implement new dplyr functions
What changes are included in this PR?
Implement them
Are these changes tested?
Yeah
Are there any user-facing changes?
Moar functions
AI Use
Code generated using Claude, with plenty of input from me. I've gone through it in detail and refactored lots, but it needs a last pass before it's ready for review.