Summary
Cypher queries that carry a secondary alias through a WITH and then bind it as a node variable in a trailing MATCH are rejected by the GFQL lowering. This blocks the LDBC SNB IC1 shortestPath shape and similar re-entry patterns.
Repro (minimal, fails on master 41d865ac9)
MATCH (p:Person {id: $pid}), (friend:Person)
WHERE NOT p = friend
WITH p, friend
MATCH path = shortestPath((p)-[:KNOWS*1..3]-(friend))
RETURN friend.id AS friendId, length(path) AS dist
Expected vs observed
- Expected: shortestPath is computed with
friend already constrained from the prefix WITH.
- Observed:
GFQLValidationError: [unsupported-cypher-query] Cypher MATCH after WITH does not yet support re-binding a carried secondary alias as a node variable in the trailing MATCH | field: match | value: ['friend']
Source
- Guard:
graphistry/compute/gfql/cypher/lowering.py:7181
- Asserting test:
graphistry/tests/compute/gfql/cypher/test_lowering.py:9082 (pytest.raises(... match="re-binding a carried secondary alias"))
Benchmark evidence
pyg-bench artifact: results/runs/dgx-spark-ic1-conformance-2026-04-05/probe-results.json
- LDBC SNB lane:
interactive-complex-1 / named-shortest-friends
- Probe
semantic_scope: adapter_shortest_path_join_workaround — adapter currently splits this into a workaround pass because the direct shape is rejected here.
- Official query at
third_party/ldbc_snb_interactive_v1_impls/cypher/queries/interactive-complex-1.cypher uses exactly this WITH p, friend MATCH path = shortestPath((p)-[:KNOWS*1..3]-(friend)) shape.
Acceptance criteria
- The minimal repro above succeeds end-to-end with a row per
(p, friend) pair carrying the shortestPath length.
- The secondary-alias rebinding guard at
lowering.py:7181 is retired or scoped down (e.g., admit when the rebound alias is the trailing pattern endpoint of a shortestPath() / regular-pattern MATCH).
- At least one regression test under
graphistry/tests/compute/gfql/cypher/ exercises the IC1 shape directly.
- The blocking xfail-style test asserting the guard fires can be deleted or repurposed as a positive test.
Subsystem / scope
Related
Summary
Cypher queries that carry a secondary alias through a
WITHand then bind it as a node variable in a trailingMATCHare rejected by the GFQL lowering. This blocks the LDBC SNB IC1 shortestPath shape and similar re-entry patterns.Repro (minimal, fails on master
41d865ac9)Expected vs observed
friendalready constrained from the prefixWITH.GFQLValidationError: [unsupported-cypher-query] Cypher MATCH after WITH does not yet support re-binding a carried secondary alias as a node variable in the trailing MATCH | field: match | value: ['friend']Source
graphistry/compute/gfql/cypher/lowering.py:7181graphistry/tests/compute/gfql/cypher/test_lowering.py:9082(pytest.raises(... match="re-binding a carried secondary alias"))Benchmark evidence
pyg-benchartifact:results/runs/dgx-spark-ic1-conformance-2026-04-05/probe-results.jsoninteractive-complex-1/named-shortest-friendssemantic_scope: adapter_shortest_path_join_workaround— adapter currently splits this into a workaround pass because the direct shape is rejected here.third_party/ldbc_snb_interactive_v1_impls/cypher/queries/interactive-complex-1.cypheruses exactly thisWITH p, friend MATCH path = shortestPath((p)-[:KNOWS*1..3]-(friend))shape.Acceptance criteria
(p, friend)pair carrying the shortestPath length.lowering.py:7181is retired or scoped down (e.g., admit when the rebound alias is the trailing pattern endpoint of ashortestPath()/ regular-pattern MATCH).graphistry/tests/compute/gfql/cypher/exercises the IC1 shape directly.Subsystem / scope
graphistry/compute/gfql/cypher/lowering.py(alias rebinding gate)graphistry/compute/gfql/cypher/reentry/runtime.py+cypher/reentry_plan.py(carry plumbing for the rebound alias)Related