Improve on unpack()
column name duplication errors
#1448
Merged
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.
Closes #1425 (Unless we decide otherwise)
Related to #1367
I'd say that this resolves #1425 by giving a much better error message.
It also resolves this comment #1367 (comment), again with a much better error message.
It does not resolve the original issue presented in #1367 about using some automatic separator for unnamed elements. I think that is related but can be thought about separately. I've kept that one open.
In general this improves errors for
unpack()
,unnest()
,unnest_wider()
, and theseparate_wider_*()
family.There are two types of name duplication issues that can occur when unpacking, which I have called:
This PR attempts to give better error messages for both of those cases when
names_sep = NULL
andnames_repair = "check_unique"
, i.e. the user has not attempted to solve these issues themselves yet.I tried not to mention "unpacking" in the error because these bubble up from other functions.
You would get more indented bullets if there are additional problems (see tests)