Negating a view-scoped filter is a no-op; the intended semantics are undefined
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 642
- Forks
- 70
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 21
Description
Raised from review on #2707: https://github.com/Pometry/Raphtory/pull/2707#discussion_r3765462678
What
A filter expression that scopes to a view can be negated, and the negation currently does nothing — the result is the same as the un-negated filter. The parity suite pins that behaviour so it cannot change silently, but nobody has decided what it should mean.
The question
From the review:
we might need to think about what this is supposed to actually mean (it is weird that this seems to be a no-op), should this be equivalent to excluding all events that are in the view from the filtered graph?
That reading — negation excludes the events the view selects — seems the most natural, but it is a semantics decision rather than something a test PR should settle, so the current no-op is pinned as-is.
Why it matters
A no-op negation is a silent wrong answer: a caller who writes it gets an unfiltered result rather than an error, so the mistake is invisible. Either the operation should mean something specific, or it should be rejected.
Suggestion
Decide between:
- Define it — negating a view scope excludes the events in that view, and implement it on both sides.
- Reject it — refuse the expression at build time, so a caller finds out immediately instead of getting an unfiltered result.
Whichever is chosen, the parity test that currently pins the no-op should be updated to pin the new behaviour.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the parity test that currently pins negating a view-scoped filter as a no-op, then read the linked review discussion on pull request #2707. Done means choosing defined exclusion semantics or build-time rejection, implementing that choice on both sides if needed, and updating the parity test to pin the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100