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

Abort or decay to tibble if epi_df column duplication or renaming invalidates key #194

Closed
brookslogan opened this issue Aug 8, 2022 · 1 comment · Fixed by #196
Closed
Assignees
Labels
bug Something isn't working P3 very low priority

Comments

@brookslogan
Copy link
Contributor

If a user duplicates one of the key columns or renames the geo_value or time_value column, we should either raise an error or decay to a tibble. Related to, or intersects with, #192. Taken from discussion on #185.

Marking as P3 as it seems low probability that this will cause confusion. (It seems extremely unlikely that a user would directly duplicate key columns. They might be more tempted to try renaming geo_value and time_value, but I think we also make it clear that we expect these fixed names, so they should probably suspect this would cause issues. Libraries might try to do such duplication or renaming in the implementation details of some sensible operation, but I can't think of when this might actually happen.)

@brookslogan brookslogan added bug Something isn't working P3 very low priority labels Aug 8, 2022
@rachlobay
Copy link
Collaborator

Looking at the ex. from our discussion on #185, if we take ex1[,c(1,1,2:4)] and try to coerce that to a tibble using as_tibble(ex1[,c(1,1,2:4)]), this results in an error on my end:

! Column name `pol` must not be duplicated.
Use .name_repair to specify repair.
Caused by error in `repaired_names()`:
! Names must be unique.

Similarly if we try to duplicate other cols in that df. Hence, it may be best to abort for col. duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3 very low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants