Skip to content

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

Description

@jtelleriar

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!

Activity

  1. 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[/+] on Oct 7, 2019
  2. changed the title [-]Feature Request: data.table New Argument: "join". Objective: ANSI SQL Syntax[/-] [+]New Argument: "join". Objective: ANSI SQL Syntax[/+] on Oct 7, 2019
  3. shrektan commented on Oct 7, 2019

    @shrektan
    Member

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

  4. jangorecki commented on Oct 7, 2019

    @jangorecki
    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.

  5. jtelleriar commented on Oct 23, 2019

    @jtelleriar
    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] :)

  6. added
    joinsUse label:"non-equi joins" for rolling, overlapping, and non-equi joins
    on Apr 5, 2020
  7. matthewgson commented on Jan 5, 2021

    @matthewgson

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestjoinsUse label:"non-equi joins" for rolling, overlapping, and non-equi joinstop requestOne of our most-requested issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions