Learn R Programming

duckdb (version 0.6.0)

rel_inner_join: Lazily INNER join two DuckDB relation objects

Description

Lazily INNER join two DuckDB relation objects

Usage

rel_inner_join(left, right, conds)

Value

a new duckdb_relation object resulting from the join

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

Examples

Run this code
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)

Run the code above in your browser using DataLab