rel_inner_join {duckdb}R Documentation

Lazily INNER join two DuckDB relation objects

Description

Lazily INNER join two DuckDB relation objects

Usage

rel_inner_join(left, right, conds)

Arguments

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

Value

a new duckdb_relation object resulting from the join

Examples

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)

[Package duckdb version 0.6.0 Index]