| rel_inner_join {duckdb} | R Documentation |
Lazily INNER join two DuckDB relation objects
rel_inner_join(left, right, conds)
left |
the left-hand-side DuckDB relation object |
right |
the right-hand-side DuckDB relation object |
conds |
a list of DuckDB expressions to use for the join |
a new duckdb_relation object resulting from the join
con <- DBI::dbConnect(duckdb())
DBI::dbExecute(con, 'CREATE MACRO eq(a, b) AS a = b')
left <- rel_from_df(con, mtcars)
right <- rel_from_df(con, mtcars)
cond <- list(expr_function("eq", list(expr_reference("cyl", left), expr_reference("cyl", right))))
rel2 <- rel_inner_join(left, right, cond)