Conversation
…entry (#1071) Pre-rewrite the prefix WITH stage in _compile_bounded_reentry_query so secondary whole-row aliases are demoted to scalar property carries (S.X AS __cypher_reentry_<S>_<X>__) and downstream S.X references compose with the existing single-whole-row machinery (#1047/#1068). RETURN of a secondary whole-row alias, and re-binding a secondary alias as a node variable in the trailing MATCH, remain unsupported with precise errors. Closes #1071. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…#1071) Closes review gaps surfaced by /review on PR #1247: - assert the secondary-alias rebinding guardrail (re-binding a carried secondary alias as a node variable in the trailing MATCH) - add a cuDF parity test for the property-carry path Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…as rewrite (#1071) Wave 2 review follow-ups on PR #1247: - Upgrade the IC1-shape regression test to use the actual variable-length [:KNOWS*1..3] path the LDBC SNB IC1 query specifies, exercising both 1-hop and 2-hop secondary-alias carry. - Add a regression test that locks the tree-shape (OR) trailing WHERE rewrite of a secondary alias property reference; verifies the demoter composes correctly with _rewrite_where_clause_and_resync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…hs (#1071) Wave 3 review follow-ups on PR #1247: - Lock the double-prefix collision-resistance: a user-named carried scalar (b.id AS a_id) and a demoted secondary property ref (a.id) both target output 'a_id'/'__cypher_reentry_a_id__' in the prefix WITH; the outer _reentry_hidden_column_name wrap keeps the in-table columns distinct, so values flow correctly to RETURN. Defense-in-depth against future changes to the carry naming scheme. - Lock the inline node-pattern property map rewrite path: a secondary alias property reference inside a node pattern's property map (MATCH (c {tag: a.tag})) is correctly rewritten via _rewrite_reentry_match_clause's pattern-element walk. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 3, 2026
Cypher: WITH before MATCH re-entry restricts projection to single whole-row alias (blocks IC1)
#1071
Closed
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
WITHbefore a Cypher MATCH re-entry must project exactly one whole-row node alias. LDBC SNB IC1 and any pattern carrying two or more node bindings (WITH p, friend, ...) now compile and execute locally._compile_bounded_reentry_querypre-rewrites the prefixWITH. The trailing-MATCH primary alias remains the sole whole-row carry; secondary aliases are demoted to scalar property carries via synthesizedS.X AS __cypher_reentry_<S>_<X>__items, with downstreamS.Xreferences rewritten to bare hidden identifiers that compose with the existing single-alias machinery (Cypher/GFQL: multi-alias WITH prefix projection for bounded reentry #1047 / fix(cypher): support multi-row scalar prefix in MATCH re-entry (#1047) #1068).RETURN s); re-binding a secondary alias as a node variable in the trailing MATCH.Closes #1071.
Test plan
python -m pytest graphistry/tests/compute/gfql/cypher/— 1097 passed, 66 skipped, 15 xfailed./bin/typecheck.sh— clean (229 source files)./bin/lint.sh— cleantest_string_cypher_executes_ic1_shaped_multi_alias_with_match_reentry— IC1 shape withp.firstNamecarrytest_string_cypher_executes_three_alias_with_match_reentry— 3-alias carrytest_string_cypher_with_match_reentry_multi_whole_row_alias_unreferenced_secondarytest_string_cypher_with_match_reentry_multi_whole_row_alias_property_carrytest_string_cypher_failfast_rejects_with_match_reentry_secondary_whole_row_returntest_issue_1026_multi_alias_with_optional_match_carries_secondary_property(was_rejects_cleanly)test_string_cypher_with_match_reentry_multi_whole_row_alias_unreferenced_secondary(was_failfast_rejects_with_match_reentry_multiple_whole_row_aliases_with_carried_scalars)🤖 Generated with Claude Code