Repository navigation
feat(cypher): WHERE on OPTIONAL MATCH + multiple OPTIONAL MATCH (#1024, #1025) - #1030
Merged
Merged
Conversation
lmeyerov
force-pushed
the
fix/issue-1025-multiple-optional-match
branch
from
April 3, 2026 08:30
2b3a793 to
40a9a18
Compare
Contributor
Author
|
Branch-validation benchmark update from Pinned artifact:
Command:
Current result:
So the benchmark read is:
I would not call |
Contributor
Author
|
Additional DGX benchmark detail from the same staged I reran the already-staged remote directory directly under Result:
So the current benchmark read is stronger than just “still fails”:
That makes it hard to treat this branch as materially improving benchmark readiness for |
#1025) - Add MatchClause.where field to associate WHERE with its preceding MATCH - Fix parser to scope each WHERE to its MATCH clause - Add _apply_where_to_ops() to apply per-match WHERE predicates - Generalize _is_connected_optional_match_query() to N optionals - Generalize ConnectedOptionalMatchPlan with N arms for chained left-outer-joins - 12 new tests covering WHERE + multi-optional boundaries Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Audit-driven tests: chained optionals sharing non-base aliases, transitive null-fill, WHERE on 3+ optionals, single-node base with 3 optionals, partial null-fill pattern, property WHERE filtering, multi-optional ORDER BY + LIMIT. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
#1024, #1025) - Remove unused `ops` parameter from `_apply_where_to_ops()` - Add single-node base + WHERE + 3 optionals test - Add cross-alias property comparison WHERE test Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…alidation error (#1024, #1025) When a WHERE predicate references an alias from a different MATCH clause (e.g., WHERE x.val < z.val where x is in the base MATCH and z is in a different OPTIONAL MATCH), raise GFQLValidationError instead of letting a raw ValueError escape from the chain executor. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
#1024, #1025) WHERE expressions that cannot be lowered to node/edge filters (e.g., r <> r2 alias comparisons) now raise GFQLValidationError instead of being silently dropped, which caused wrong-answer results for TCK match7-11. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…rms (#1024, #1025) Variable-length relationships in OPTIONAL MATCH clauses (e.g., [:BAR*]) are not yet supported in the connected optional match path. The detection function now rejects these to prevent wrong-answer results (TCK match7-15). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…path (#1024, #1025) Comma-separated MATCH patterns like (a:A), (b:B) require cartesian product semantics that the binding_ops mechanism cannot handle. Reject them in _is_connected_optional_match_query() so they fall through to the existing rejection path (TCK match7-26). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
lmeyerov
force-pushed
the
fix/issue-1025-multiple-optional-match
branch
from
April 3, 2026 23:37
e5b04cb to
0bcb631
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This was referenced Apr 4, 2026
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.
Summary
MatchClause.where, enabling queries likeMATCH ... WHERE ... OPTIONAL MATCH ... WHERE ... RETURN.Architecture
ast.py: NewMatchClause.where: Optional[WhereClause]fieldparser.py: Each WHERE is scoped to its preceding MATCH viareplace(match_clauses[-1], where=item)lowering.py:_apply_where_to_ops()applies label/property WHERE per-clause; N-armConnectedOptionalMatchPlangfql_unified.py: Chained left-outer-join loop over N armsTest plan
🤖 Generated with Claude Code