Skip to content

join_by(): Syntax for generic joins #2240

@krlmlr

Description

@krlmlr

#557 (comment) and #378 (comment) propose a syntax for generic and rolling joins:

left_join( 
  FundMonths, Returns, 
  join_by(FundID == FundID, yearmonth > gmonth + 3, yearmonth <= gmonth + 15)
)

left_join( 
  events, days,
  join_by(collector_id == collector_id, event_timestamp >= largest(day))
)

As usual, this should be powered by an SE version join_by_().

We can pass this to the SQL engine (and perhaps to data tables) with relatively little work, the main challenge will be to implement this for data frames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementtables 🧮joins and set operations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions