Repository navigation
feat(cypher): support connected MATCH + OPTIONAL MATCH (#996) - #1021
Merged
Merged
Conversation
Add a new compilation path for queries where the non-optional MATCH is a connected path followed by an OPTIONAL MATCH. The compiler lowers each clause independently, left-outer-joins binding-row tables on shared node aliases at runtime, and delegates RETURN / ORDER BY / SKIP / LIMIT to the standard row pipeline — giving full expression parity with the normal Cypher path. Also fix cudf.DataFrame.from_pandas → cudf.from_pandas across the GFQL Cypher test suite for RAPIDS 25.02 + 26.02 compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…cudf compat - Add query.where guard to _is_connected_optional_match_query() so queries with WHERE clauses (like TCK match-where6-1) stay on the existing rejection path instead of producing wrong results. - Remove plans/ from tracked files (CI no-plans-in-repo check). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This was referenced Apr 2, 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
MATCH (connected-path) OPTIONAL MATCH ... RETURNqueries where the non-optional MATCH is a connected path. Unblocks LDBC SNB Interactiveinteractive-short-7(IS7) and any query combining a connected traversal with an optional extension and mixed-alias orCASE-expression projections (Cypher/GFQL cannot lower MATCH + OPTIONAL MATCH reply-author flag queries after a connected MATCH #996).cudf.DataFrame.from_pandas()→cudf.from_pandas()across the GFQL Cypher test suite for RAPIDS 25.02 + 26.02 compatibility (42 call sites).Architecture
New compilation path
_compile_connected_optional_match()inlowering.py:_merged_match_clause()runslower_match_clause()post_join_chainusing the same_build_projection_plan+return_()+_lower_order_by_clauseinfrastructure as the normal pathNew execution path
_apply_connected_optional_match()ingfql_unified.py:rows(binding_ops=...)to produce binding-row tables_chain_dispatchNo hand-rolled expression evaluation — full feature parity with the normal Cypher path because the same row pipeline handles all expression types.
Test plan
type(),coalesce(), arithmetic,CASE WHEN ... IS NULL🤖 Generated with Claude Code