any suggestions on how we can implement this? <ht...
# daft-dev
c
any suggestions on how we can implement this? https://github.com/Eventual-Inc/Daft/issues/3194 Like if you wanted the same output through the dataframe api, how would one go about it?
c
You'd need to alias the right side join key, like:
Copy code
table1.join(
    table2, left_on="id", right_on=daft.col("id").alias("right.id"), how="left"
).collect()
šŸ™Œ 1
Copy code
╭───────┬───────┬──────────┬─────────────╮
│ id    ┆ value ┆ right.id ┆ right.value │
│ ---   ┆ ---   ┆ ---      ┆ ---         │
│ Int64 ┆ Utf8  ┆ Int64    ┆ Utf8        │
ā•žā•ā•ā•ā•ā•ā•ā•ā•Ŗā•ā•ā•ā•ā•ā•ā•ā•Ŗā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•Ŗā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•”
│ 1     ┆ a     ┆ None     ┆ None        │
ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
│ 2     ┆ b     ┆ 2        ┆ b           │
ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
│ 3     ┆ c     ┆ 3        ┆ c           │
ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
│ 4     ┆ d     ┆ 4        ┆ d           │
╰───────┓───────┓──────────┓─────────────╯