Skip to content

fix(cypher): support reentry MATCH WHERE WITH - #1028

Merged
lmeyerov merged 5 commits into
fix/issue-1000-dynamic-pattern-propertiesfrom
fix/issue-1000-reentry-match-where-with
Apr 3, 2026
Merged

lmeyerov merged 5 commits into
fix/issue-1000-dynamic-pattern-propertiesfrom
fix/issue-1000-reentry-match-where-with

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • support alternating reentry shapes of the form MATCH ... WITH ... MATCH ... WHERE ... WITH ... MATCH ... RETURN
  • attach the post-reentry WHERE to the correct current reentry stage during bounded reentry compilation
  • move the exact #1000 IC6 query past the earlier post-reentry-WHERE parser barrier to the next UNWIND after post-WITH MATCH blocker
  • lock the new parser boundary so direct MATCH after post-WITH WHERE and multi-WHERE reentry shapes still fail fast explicitly

Scope

This is Phase 2 of #1000, stacked on top of Phase 1 PR #1027.

What it covers:

  • connected MATCH ... WITH ... MATCH ... WHERE ... WITH ... MATCH ... RETURN
  • carried-scalar variants of that same reentry shape
  • empty-result behavior for the new WHERE ... WITH reentry path
  • exact IC6 blocker progression from post-reentry WHERE to post-reentry UNWIND

What it does not cover yet:

  • UNWIND between reentry stages
  • the remaining IC6 comma-pattern reentry fanout around post

Links

Amplification notes

The follow-on coverage on this branch also locks the intended fail-fast boundaries around the parser state change:

  • direct MATCH after post-WITH WHERE is still rejected
  • multiple post-reentry WHERE clauses are still rejected explicitly

Testing

  • python3.12 -B -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py -k 'multi_stage_with_match_reentry_connected_shape or multi_stage_with_match_reentry_carried_scalar_shape or multi_stage_with_match_reentry_with_intermediate_where or failfast_rejects_direct_match_after_post_with_where_without_intervening_with or failfast_rejects_multiple_post_with_where_clauses or issue_1000_ic6_after_phase2_now_stops_at_post_with_match_unwind'
  • python3.12 -B -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py -k 'same_path_expression_valued_pattern_property or non_property_dynamic_pattern_expression_runtime or reentry_identifier_valued_pattern_property or reentry_relationship_expression_valued_pattern_property'
  • ruff check graphistry/compute/gfql/cypher/parser.py graphistry/compute/gfql/cypher/lowering.py graphistry/tests/compute/gfql/cypher/test_lowering.py

@lmeyerov
lmeyerov force-pushed the fix/issue-1000-dynamic-pattern-properties branch from 5baaf5e to 2a50cfc Compare April 3, 2026 03:18
@lmeyerov
lmeyerov force-pushed the fix/issue-1000-reentry-match-where-with branch from a3053e5 to 024a2bc Compare April 3, 2026 03:18
@lmeyerov
lmeyerov marked this pull request as ready for review April 3, 2026 08:01
@lmeyerov
lmeyerov merged commit 7dd52df into fix/issue-1000-dynamic-pattern-properties Apr 3, 2026
146 of 177 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant