semi_join() keeps the rows of x that have a match in y, and
anti_join() the rows that have none, as in dplyr. Both run on the GPU.
As in dplyr, they take no suffix/keep/multiple/unmatched/
relationship arguments: nothing from y is added, so the result has
x's columns and a subset of its rows (each kept row once, duplicates of
x included), and keeps x's group_by() grouping.
Arguments
- x, y
tbl_gpuobjects to join. Ifyis not atbl_gpu, setcopy = TRUEto upload it automatically.- by
Join specification – see "Details" above and
?mutating-joins.- copy
Whether to upload a non-
tbl_gpuyviatbl_gpu().- ...
Not used; dplyr itself requires these to be empty.
- na_matches
"na"(default,NAkeys match each other) or"never"(NAkeys never match anything).
Value
A tbl_gpu with x's own schema, filtered to the rows that
(semi_join()) or don't (anti_join()) have a match in y. x's
group_by() grouping is preserved; on a .drop = FALSE table every group
of x is kept, including the ones the join empties, like dplyr.
Details
by accepts the same forms as the mutating joins (see ?mutating-joins):
NULL, a character vector, or a dplyr::join_by() spec, including
non-equi conditions (>=, >, <=, <, between()/within()/
overlaps()). A single closest() condition runs on the GPU (it asks
whether an x row has a closest match), as do non-equi conditions over two
string columns; other shapes run in dplyr on the CPU, as for the mutating
joins (set options(cuplyr.fallback = "warn") to be told when; see
cuplyr-fallback).
