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

New Argument: "join". Objective: ANSI SQL Syntax #3946

Open
jtelleriar opened this issue Oct 7, 2019 · 4 comments
Open

New Argument: "join". Objective: ANSI SQL Syntax #3946

jtelleriar opened this issue Oct 7, 2019 · 4 comments
Labels
feature request joins top request One of our most-requested issues

Comments

@jtelleriar
Copy link

Could data.table add a new argument, "join", that instead of using the 'deafult' data.table's own joining syntax, uses that of ANSI SQL.

x[i, j, by, ..., join = 'default']

Where join = c('default', 'left', 'right', 'inner', 'outer').

So that:

  • join = 'left' behaves like X[Y]
  • join = 'inner' behaves like X[Y, nomatch=0]
  • ...

Thank you!

@jtelleriar jtelleriar changed the title Feature Request: data.table New Argument: "join" - Obj: ANSI SQL Syntax Feature Request: data.table New Argument: "join". Objective: ANSI SQL Syntax Oct 7, 2019
@jangorecki jangorecki changed the title Feature Request: data.table New Argument: "join". Objective: ANSI SQL Syntax New Argument: "join". Objective: ANSI SQL Syntax Oct 7, 2019
@shrektan
Copy link
Member

shrektan commented Oct 7, 2019

I think if we want to add the new argument, merge.data.table is a better place to have this.

@jangorecki
Copy link
Member

There is a plan to support syntax similar to the one proposed in this issue. I think there is an open issue for that.
@arunsrinivasan had some interesting ideas recently about improving join api.

@jtelleriar
Copy link
Author

For me, it shall be implemented both in the data.table DT[X] Join Syntax, and in merge.data.table.

As DT[X] allows non-equi joins.

As pointed out before, the objective of this is to transform Y[X, join = "left"] to X[Y] :)

@matthewgson
Copy link

I vote for this too. Switching the X and Y position to perform left join changes the entire order of columns.

@MichaelChirico MichaelChirico added the top request One of our most-requested issues label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request joins top request One of our most-requested issues
Projects
None yet
Development

No branches or pull requests

5 participants