Skip to content

fix(gfql): polars plain single-hop chains collapse duplicate node rows (#2051) - #2060

Closed
lmeyerov wants to merge 2 commits into
masterfrom
fix/gfql-2051-polars-plain-hop-dup-rows
Closed

fix(gfql): polars plain single-hop chains collapse duplicate node rows (#2051)#2060
lmeyerov wants to merge 2 commits into
masterfrom
fix/gfql-2051-polars-plain-hop-dup-rows

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Closes #2051. Independent of the #2055/#2056 stack (polars chain only).

Defect. The unnamed, untyped single-hop chain shape on polars is served by the chain's skip-combine branch, whose node frame is a semi-join against the node table, so a node table carrying the same id twice came back with both rows. pandas, cuDF, the full polars chain, hop(), and every named/typed/multi-hop/undirected polars shape collapse the duplicate.

Root cause, confirmed by amplification. Replaying the existing suites with GFQL_ROUTES_OFF=polars-plain (the route-off switch from #2054) made the #2051 strict expected failures XPASS: with the branch out of the way the full chain collapses the rows. One line: the branch now applies the same unique(subset=[node]) rule as the full chain's node materialization.

Pins. graphistry/tests/compute/gfql/lazy/engine/polars/test_chain_duplicate_node_rows_2051.py: the two leaking shapes flip from strict expected failure to green against pandas; the five collapsing shapes and hop() stay green.

Receipts (local, polars 1.42, cudf 25.10): 1374 passed / 176 skipped / 17 xfailed across the polars mirror suites, residual-polars, native seed resolution, polars conformance matrix and binding rows, chain, endpoint-closure matrix, collision matrix and index suites; guards OK; mypy identical to master; ruff clean. dgx GPU lane after the step-7 window.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA

@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

CI receipt at 95d03e2: 40 check-runs success, 17 skipped by the CI path filter as whole jobs (umap/spark/full-ai/neo4j/graphviz/dgl/docs/build matrices and the cypher-frontend gates). The GFQL lanes all ran and passed: tck-gfql, gfql-benchmarks, test-gfql-core (3.12, 3.14), test-pandas-compat-gfql (legacy py3.9, latest py3.14), test-polars (3.9–3.14), python-lint-types (3.8–3.14).

Local at the same head: 1374 pass on the polars chain suites with the #2051 pins flipped from strict xfail to pass (see the PR body). Stacked order for landing: #2055#2056 → this PR. The dgx cuDF + polars-gpu lane runs after the step-7 window on dgx closes (a timed benchmark lane is running there now); I will post it here.

@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

CI receipt at b48f87b (the #2043 dedup marker dropped): 62 check-runs success, 7 skipped by the path filter as whole jobs; tck-gfql, test-polars ×6, test-gfql-core, gfql-benchmarks and the lint/guard lanes all green. Ready for owner merge after #2055#2056 (this PR sits on master directly, so it can also go first).

lmeyerov and others added 2 commits September 6, 2026 06:03
…e id (#2051)

The unnamed, untyped single-hop chain shape is served by the polars chain's skip-combine
branch, which built its node frame with a semi-join against the node table and so kept
a node table's duplicate rows for the same id, where the full polars chain, pandas and
cuDF collapse them. Root cause confirmed by route-off amplification: with the branch
forced to decline, the #2051 strict expected failures pass. The branch now applies the
same one-row-per-id rule as the full chain's node materialization.

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-2051-polars-plain-hop-dup-rows branch from b48f87b to 347d975 Compare September 6, 2026 13:03
@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

CI receipt at 347d975 (union-rebased onto master after #2055 landed; own delta unchanged, CHANGELOG union clean): 62 check-runs success, 7 path-skipped. GPU receipt above stands.

@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #2056 (owner asked for a shallower stack); the commits, receipts and CHANGELOG entries live there unchanged.

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 polars: an unnamed untyped single-hop chain keeps duplicate node rows that pandas, cuDF and polars' own multi-hop collapse

1 participant