INL/BlackLab

Relation queries should produce identical results but don't

Opened this issue · 0 comments

The following queries should have identical results:

n:_  -case-> v1:_; -case-> v2:_  :: start(v1) < start(n) & start(n) < start(v2)
n:_  -case-> v1:_; -case-> v2:_  :: start(v2) < start(n) & start(n) < start(v1)

However, the results differ. This is caused by the "deduplication" of matched relations, which says that if you return relations A and B as v1 and v2, you're not allowed to also return those same relations A and B as v2 and v1, as that would be the exact same set of relations, just with the names v1 and v2 swapped.

Maybe this deduplication can only be done after evaluating the condition.