Skip to content

Add 'where' argument to [ #2911

@MichaelChirico

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)]]

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