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

allow specifying which columns to merge on #224

Open
yakir12 opened this issue Mar 20, 2019 · 1 comment
Open

allow specifying which columns to merge on #224

yakir12 opened this issue Mar 20, 2019 · 1 comment

Comments

@yakir12
Copy link
Contributor

yakir12 commented Mar 20, 2019

When merging two tables,

t1 = table((x = [1,2], y = [3,4], t = [5,6]), pkey = [1])
t2 = table((z = [1,2], y = [3,4], t = [7,8]), pkey = [1])

it would be easier to:

merge(t1, t2, on = (:y, :t))

than what we need to do to accomplish the same thing today:

merge(select(t1, (:y, :t)), select(t2, (:y, :t)))

The exact semantics is immaterial, but since a merge requires the same columns in both tables, it should be necessary to specify the selected columns only once (and not twice).

@shashi
Copy link
Collaborator

shashi commented Mar 27, 2019

on is probably too overloaded by how SQL uses it in JOINs. I think this keyword arg should be called... select :-)

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

No branches or pull requests

2 participants