Skip to content

fix(gfql): multi-hop alias/column collisions are served on pandas and cuDF (#2049) - #2055

Open
lmeyerov wants to merge 1 commit into
masterfrom
fix/gfql-2049-multihop-alias-collision
Open

fix(gfql): multi-hop alias/column collisions are served on pandas and cuDF (#2049)#2055
lmeyerov wants to merge 1 commit into
masterfrom
fix/gfql-2049-multihop-alias-collision

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Stacked on #2046 (retargets to master when it lands). Closes #2049.

Defect. The eager half of the #2039 class: for a non-simple step (hops=2, to_fixed_point=True) whose edge alias names the column its own edge_match filters on, the chain's backward pass re-executed the reversed hop on the forward step's edges, where the alias marker had already replaced that column, so filter_edges_by_dict saw booleans and raised incompatible-column-type on pandas and cuDF. Single-hop steps never hit it (the fast backward branch filters endpoints without re-applying edge_match), which is why #2046 was polars-only.

Fix. _step_with_source_edge_columns (chain.py): when the step's alias collides with an edge column, the backward re-execution runs on the graph's own edge rows for the step's edge ids. Cost-neutral otherwise (only engages on a collision). The rows now match the same chain with a non-colliding alias and match polars.

Not changed, on purpose. Polars serves these shapes already; its colliding column keeps the user values with the marker beside it, which test_alias_scoping_semantics.py pins as the polars alias-scoping contract. #2049 is rescoped to the eager engines accordingly; the collision matrix's multi-hop pins compare rows, not column contents.

Pins. graphistry/tests/compute/test_chain_alias_column_collision.py: the two multi-hop shapes × pandas/cuDF/polars flip from strict expected failure to green (parity with the control alias). Existing alias-scoping, chain, hop, residual-polars and native-seed suites unchanged.

Receipts (local RTX 3080 Ti, cudf 25.10, polars 1.42): 606 passed / 9 xfailed across the collision matrix, chain, hop, alias-scoping, residual-polars, hop-scaling and native-seed suites with the cuDF lane on; comment-density and type-hygiene guards OK; mypy on chain.py identical to master (5 pre-existing); ruff clean. The dgx GPU lane runs after the step-7 measurement window closes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA

…olumn is served on pandas and cuDF (#2049)

The eager half of the #2039 class: for a non-simple step (hops=2, to_fixed_point) the
backward pass re-executed the reversed hop on the forward step's edges, where the alias
marker had already replaced the column the step's own edge_match filters on, so the filter
saw booleans and raised incompatible-column-type. The backward re-execution now reads the
graph's edge columns for that step's edge ids when the alias collides, so the eager engines
return the same rows as polars and as the same chain with a non-colliding alias.

Polars keeps its pinned alias-scoping contract for the colliding column (user values stay,
marker beside them); the collision matrix's multi-hop pins compare rows, not column
contents, and flip from strict expected failure to green here.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA
@lmeyerov
lmeyerov force-pushed the fix/gfql-2049-multihop-alias-collision branch from 3cc3846 to 3312f00 Compare September 5, 2026 21:57
@lmeyerov

lmeyerov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

READY (3312f00, on master b8f3e99) — CI 69/69 non-skipped check-runs success; the 8 skipped lanes are the gfql path filter (chain.py is outside it; #2057 proposes the fix). tck-gfql run locally from its current main (66fee10, the ref CI would use) against this head: exit 0 — 3658 scenarios, 2964 supported, 1977 translated-supported, 689 xfail (baseline), direct-Cypher non-validation debt 0, no outcome drift. Local suites: 606 passed / 9 xfailed across collision matrix, chain, hop, alias-scoping, residual-polars, hop-scaling and native-seed with the cuDF lane; guards OK; mypy = master; ruff clean.

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.

gfql: an edge alias that collides with the column its own filter uses breaks multi-hop steps (pandas/cuDF raise, polars mis-names)

1 participant