Skip to content

feat(gfql/m2): route CALL/GRAPH compatibility through LogicalPlan - #1147

Merged
lmeyerov merged 2 commits into
masterfrom
m2-pr5-call-graph-compat-lane
Apr 19, 2026
Merged

lmeyerov merged 2 commits into
masterfrom
m2-pr5-call-graph-compat-lane

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1128
Parent: #1139

Implements the M2-PR5 CALL/GRAPH compatibility lane by routing covered CALL shapes through explicit logical ProcedureCall operators while preserving existing runtime execution semantics.

What changed

  1. CALL logical route is now planned, not hard-deferred.
  • _logical_plan_route_for_query() now maps query.call to a verified logical ProcedureCall operator.
  1. Added compiled-call -> logical-call mapping.
  • New helper maps procedure metadata (procedure, backend, algorithm, result_kind, row_kind, output columns, params) into ir.ProcedureCall + output schema.
  1. Graph constructor / binding artifacts now carry route metadata.
  • CompiledCypherGraphQuery and CompiledGraphBinding now include:
    • logical_plan
    • logical_plan_defer_reason
    • logical_plan_route (derived)
  • CALL-based graph constructors/bindings are planned.
  • MATCH-based graph constructors preserve explicit defer reasons when planner skeleton shape coverage is insufficient.
  1. Added ProcedureCall verifier compatibility tests.
  • Positive verifier coverage for both procedure result kinds (rows and graph).

Behavior / Scope

  • Runtime CALL/GRAPH execution semantics are unchanged in this PR.
  • This is a logical-route compatibility lane, not an executor redesign.
  • Unsupported shapes remain explicit deferred/guarded, not silent fallback.

Tests

  • Targeted CALL/GRAPH route tests:
    • PYTHONPATH=. uv run --no-project --with pytest python -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py -k "logical_plan_route_for_call_shape or graph_query_sets_logical_plan_route_for_call_constructor or graph_binding_call_constructor or graph_query_sets_logical_plan_defer_reason_for_match_constructor_shape"
    • Result: 4 passed
  • Lane regression slice:
    • PYTHONPATH=. uv run --no-project --with pytest python -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py -k "call or graph or yield"
    • Result: 698 passed, 59 skipped
  • Full lowering suite:
    • PYTHONPATH=. uv run --no-project --with pytest python -m pytest -q graphistry/tests/compute/gfql/cypher/test_lowering.py
    • Result: 698 passed, 59 skipped
  • Planner/verifier suites:
    • PYTHONPATH=. uv run --no-project --with pytest python -m pytest -q graphistry/tests/compute/gfql/test_logical_planner.py graphistry/tests/compute/gfql/test_ir_verifier.py
    • Result: 87 passed, 1 xfailed
  • Lint/types:
    • ./bin/ruff.sh graphistry/compute/gfql/cypher/lowering.py graphistry/tests/compute/gfql/cypher/test_lowering.py graphistry/tests/compute/gfql/test_ir_verifier.py
    • MYPY_CACHE_DIR=/tmp/mypy_cache ./bin/mypy.sh graphistry/compute/gfql/cypher/lowering.py

Local wave artifacts

(Tracked locally per workflow, not committed)

  • plans/1128-m2-pr5-call-graph-compat/plan.md
  • plans/1128-m2-pr5-call-graph-compat/findings/wave-1/spec-baseline.md
  • plans/1128-m2-pr5-call-graph-compat/findings/wave-1/post-fix-audit.md
  • plans/1128-m2-pr5-call-graph-compat/findings/wave-2/confirmation-audit.md

@lmeyerov lmeyerov changed the title feat(gfql/m2): start PR5 CALL/GRAPH compatibility lane feat(gfql/m2): route CALL/GRAPH compatibility through LogicalPlan Apr 19, 2026
@lmeyerov
lmeyerov marked this pull request as ready for review April 19, 2026 04:42

Copy link
Copy Markdown
Contributor Author

Re-audited PR #1147 (b8006a5) against #1128.

Assessment: ✅ good to merge for M2-PR5 scope.

What is covered:

  • CALL route now plans to logical ProcedureCall instead of hard defer.
  • ProcedureCall mapping carries procedure/backend/algorithm/result kind/row kind/output columns/call params.
  • Graph constructor + graph bindings propagate route metadata (logical_plan, defer reason, route kind).
  • Verifier compatibility tests include both procedure result kinds (rows, graph).
  • Existing CALL/GRAPH/YIELD runtime parity suite remains green; CI matrix green.

Non-blocking caveat to track for M3:

  • For CALL queries that include additional row-sequence clauses, this lane records a procedure-boundary logical route but does not yet model the full post-CALL row operator chain in LogicalPlan. That is consistent with this compatibility lane, but worth making explicit as a follow-up boundary.

@lmeyerov
lmeyerov merged commit 4782b70 into master Apr 19, 2026
121 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.

M2-PR5: CALL/GRAPH compatibility lane in LogicalPlan

1 participant