Repository navigation
fix(graph): correct Cypher NOT precedence - #948
Merged
Merged
Conversation
Owner
Author
|
Post-merge Dream review for exact head The parser change matches the current Neo4j Cypher boolean precedence: comparisons bind before Portfolio verdict: INCONCLUSIVE rather than ACCEPT because required Workspace CI run 33321172176 cancelled its |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Cypher NOT now binds looser than comparison and tighter than AND. Queries such as
NOT n.age = 30produceNOT (n.age = 30)instead of(NOT n.age) = 30.Invariants
Comparison expressions remain inside NOT.
NOT expressions remain inside AND.
Arithmetic unary minus retains its existing precedence.
Validation
cargo test -p ruvector-graphpassed 352 tests with 13 existing ignored tests.cargo clippy -p ruvector-graph --all-targets -- -D warningspassed.RuFlo diff risk reported low risk with score 0 of 100.
Risk
The intentional behavior change affects AST shape for unparenthesized NOT expressions. Exact AST regression tests lock the Cypher precedence contract.
Fixes #939