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

Implement relationship and refine join match warning #6753

Merged
merged 5 commits into from
Feb 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
NEWS bullet tweak
  • Loading branch information
DavisVaughan committed Feb 24, 2023
commit 65a6848dd86d3f44489a540c99595ab5711fa30e
13 changes: 7 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
a clearly superior alternative.

* The mutating joins gain a new `relationship` argument, allowing you to
enforce one of the following relationship constraints between the keys of
`x` and `y`: `"none"`, `"one-to-one"`, `"one-to-many"`, `"many-to-one"`,
`"many-to-many"`, or `"warn-many-to-many"`.
optionally enforce one of the following relationship constraints between the
keys of `x` and `y`: `"one-to-one"`, `"one-to-many"`, `"many-to-one"`, or
`"many-to-many"`.

For example, `"many-to-one"` enforces that each row in `x` can match at
most 1 row in `y`. If a row in `x` matches >1 rows in `y`, an error is
thrown. This option serves as the replacement for `multiple = "error"`.

For equality joins, `relationship` defaults to `"warn-many-to-many"` to
warn if an unexpected many-to-many relationship is detected, and otherwise
defaults to `"none"` for inequality, rolling, and overlap joins.
The default behavior of `relationship` doesn't assume that there is any
relationship between `x` and `y`. However, for equality joins it will check
for the presence of a many-to-many relationship, and will warn if it detects
one.

This change unfortunately does mean that if you have set `multiple = "all"` to
avoid a warning and you happened to be doing a many-to-many style join, then
Expand Down