-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
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.
Lines 65 to 73 in 5bda2f0
| 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.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed