Relation::from_antijoin always returns an empty Relation, regardless of its inputs. That's because the antijoin helper, which takes a JoinInput as its first parameter, operates only on recent tuples.
To fix this, we should refactor the antijoin helper to work directly on Relations, and pass the proper input from Variable::from_antijoin and Relation::from_antijoin. A regression test is needed as well.
Relation::from_antijoin
always returns an emptyRelation
, regardless of its inputs. That's because theantijoin
helper, which takes aJoinInput
as its first parameter, operates only onrecent
tuples.https://github.com/rust-lang/datafrog/blob/5bda2f0d0da74e6d86431cc8e4d439d75bf27f51/src/join.rs#L65-L73
This is correct for variables, but
Relation
s, which don't change during iteration, only havestable
tuples. See https://github.com/rust-lang/datafrog/pull/36#issuecomment-898952881 for the reason this must be the case.To fix this, we should refactor the
antijoin
helper to work directly onRelation
s, and pass the proper input fromVariable::from_antijoin
andRelation::from_antijoin
. A regression test is needed as well.