Skip to content

Add 'where' argument to [ #2911

Description

@MichaelChirico

This will greatly simplify the code for doing conditional joins/conditional column updates.

Right now there's a collision conflict where i can't be used to do a logical subset and a join simultaneously. Proposed argument would allow this, e.g.:

DT[DT2, on = 'ID', where = V1 < 10, V2 := pmax(i.V3, 0)]

Current version looks quite ugly/unintuitive IMO:

DT[V1 < 10, V2 := DT2[.SD, on = 'ID', pmax(x.V3, 0)]]

Activity

  1. changed the title [-]FR: 'where' argument to [[/-] [+]Add 'where' argument to [[/+] on Oct 23, 2019
  2. jangorecki commented on Apr 5, 2020

    @jangorecki
    Member

    Adding where argument like this may be seen confusing. In sql where could be used to specify join condition as well. It make sense to postpone your request to a reworked join interface. @arunsrinivasan

  3. added
    joinsUse label:"non-equi joins" for rolling, overlapping, and non-equi joins
    on Apr 10, 2020
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 joins

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions