Update coalesce()
to use vec_case_when()
#6265
Merged
+231
−84
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.
The main change to dplyr is that this reverts most of the changes made in #5334 to support #5326. This previously iterated over data frame input column by column, but we now fully embrace the vctrs definition of a missing value, which is when the entire row is empty for data frames. Since data frame input is probably pretty rare, we are optimizing for the simplicity of the
coalesce()
implementation over supporting that feature. Users that need this can justmap2()
over their data frames, callingcoalesce()
on each column.Also:
vec_case_when()
internally.ptype
and.size
argumentsNULL
inputs are now dropped (currently they cause an obscure error)"1b1dd312-a69e-4d4c-b094-289700c3c5f6"