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

Silence many_to_many warnings #441

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Conversation

jdhoffa
Copy link
Member

@jdhoffa jdhoffa commented Jul 19, 2023

Closes #432

@jdhoffa jdhoffa requested a review from cjyetman July 19, 2023 11:24
Copy link
Member

@cjyetman cjyetman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't yet used this option, but I believe this is how it works. I don't have context for what the data look like, but I assume you understand that the "many-to-many" relationship is not default for a reason, which implies one should carefully consider if that really should be happening and what the consequence of it is.

@jdhoffa
Copy link
Member Author

jdhoffa commented Jul 19, 2023

I haven't yet used this option, but I believe this is how it works. I don't have context for what the data look like, but I assume you understand that the "many-to-many" relationship is not default for a reason, which implies one should carefully consider if that really should be happening and what the consequence of it is.

Yes indeed.

There are several kinds of joins here in which we require this type of many-to-many mapping.

  1. Joining scenarios to ABCD: There are many scenarios that map to many companies, we expect the mapping to not be distinct
  2. Joins to region_isos: There are likely to be many companies with the same plant location ISO, and many regions containing that plant location ISO, we expect the mapping to not be distinct
  3. Joins to green_techs_in_sector: We expect the same sector could pop up multiple times on the left-hand-side, and we expect there to be multiple green techs for any given sector

I believe all of these are expected.

@jdhoffa jdhoffa merged commit 0b482f8 into main Jul 19, 2023
@jdhoffa jdhoffa deleted the silence_many_to_many_warnings branch July 19, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quell warnings for many matches in new release of dplyr
2 participants