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.
|
let results = input1 |
|
.recent() |
|
.iter() |
|
.filter(|(ref key, _)| { |
|
tuples2 = gallop(tuples2, |k| k < key); |
|
tuples2.first() != Some(key) |
|
}) |
|
.map(|(ref key, ref val)| logic(key, val)) |
|
.collect::<Vec<_>>(); |
This is correct for variables, but Relations, which don't change during iteration, only have stable tuples. See #36 (comment) for the reason this must be the case.
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_antijoinalways returns an emptyRelation, regardless of its inputs. That's because theantijoinhelper, which takes aJoinInputas its first parameter, operates only onrecenttuples.datafrog/src/join.rs
Lines 65 to 73 in 5bda2f0
This is correct for variables, but
Relations, which don't change during iteration, only havestabletuples. See #36 (comment) for the reason this must be the case.To fix this, we should refactor the
antijoinhelper to work directly onRelations, and pass the proper input fromVariable::from_antijoinandRelation::from_antijoin. A regression test is needed as well.