Skip to content

fix(gfql): polars declines prune_to_endpoints on single-hop edges (#2053) - #2065

Merged
lmeyerov merged 1 commit into
fix/gfql-2058-general-path-int-dtypesfrom
fix/gfql-2053-polars-prune-typed-decline
Sep 6, 2026
Merged

fix(gfql): polars declines prune_to_endpoints on single-hop edges (#2053)#2065
lmeyerov merged 1 commit into
fix/gfql-2058-general-path-int-dtypesfrom
fix/gfql-2053-polars-prune-typed-decline

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Stacked on #2062. Closes #2053.

Defect. The polars chain implements prune_to_endpoints for variable-length hops through its auto hop labels, but a single-hop edge carrying the flag was admitted by the plain single-hop branch and by the full polars traversal and silently returned the seed and the arrival side where pandas keeps only the arrival side. Polars and pandas disagreed on every single-hop prune shape.

Fix. A single-hop edge with prune_to_endpoints raises the polars engine's typed NotImplementedError (use engine='pandas' or 'cudf'), and polars_plain_single_hop_admits declines the shape. Variable-length hops are untouched (their native pruning has pins in test_row_pipeline_boundaries.py / test_path_trail_semantics.py, which caught the first, too-wide cut). Typed decline over silent divergence; the single-hop arrival-side contract on polars is a follow-up once the plain branch carries hop labels.

Pins (tests/compute/gfql/lazy/engine/polars/chain_specializations/test_polars_admission.py): seeded and unseeded single hop raise on polars while pandas answers [2, 3]; the predicate declines the shape and still admits the plain seeded hop. The harness KNOWN entry and the corpus / _BYPASS_SHAPES #2053 tags are gone (the cells are no longer admitted on polars-plain).

Local at this head: row-pipeline boundaries + trail semantics + polars chain_specializations + routes 226 pass / 11 xfail; guards + mypy green; broad suites rerunning, posted below.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA

@lmeyerov
lmeyerov force-pushed the fix/gfql-2058-general-path-int-dtypes branch from 676232a to 640167c Compare September 6, 2026 02:48
@lmeyerov
lmeyerov force-pushed the fix/gfql-2053-polars-prune-typed-decline branch from e0d854d to e4af1a5 Compare September 6, 2026 02:48
@lmeyerov
lmeyerov force-pushed the fix/gfql-2058-general-path-int-dtypes branch from 640167c to 203845b Compare September 6, 2026 02:50
@lmeyerov
lmeyerov force-pushed the fix/gfql-2053-polars-prune-typed-decline branch 2 times, most recently from e4fbe7a to 198cbd5 Compare September 6, 2026 02:55
@lmeyerov lmeyerov changed the title fix(gfql): polars declines prune_to_endpoints on every hop shape (#2053) fix(gfql): polars declines prune_to_endpoints on single-hop edges (#2053) Sep 6, 2026
@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Local receipt at 198cbd5 (TEST_CUDF=1, cuDF 25.10 local): test_chain/test_hop/test_gfql + tests/compute/gfql + chain_specializations + collision + closure-dtype suites 12839 passed / 0 failed / 37 xfailed. The first cut (decline on every hop shape) failed two variable-length pins on polars (test_row_pipeline_boundaries, test_path_trail_semantics), which is how the scope narrowed to single-hop edges. CI pending; the dgx cuDF + polars-gpu lane for this head follows the stack's next batch.

@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

CI receipt at 198cbd5: 67 check-runs success, 7 path-skipped as whole jobs (tck-gfql, test-polars ×6, test-gfql-core, gfql-benchmarks and the guards green). Local broad suites 12839 / 0 failed. Marking ready; the dgx lane for this head rides the next stack batch (the change is a polars-only typed decline; the cuDF lane is unaffected).

@lmeyerov
lmeyerov marked this pull request as ready for review September 6, 2026 05:14
@lmeyerov
lmeyerov force-pushed the fix/gfql-2058-general-path-int-dtypes branch from 203845b to 389a346 Compare September 6, 2026 11:57
@lmeyerov
lmeyerov force-pushed the fix/gfql-2053-polars-prune-typed-decline branch from 198cbd5 to a54ac4b Compare September 6, 2026 11:57
The polars chain declined prune_to_endpoints only on multi-hop edges; the
plain single-hop branch and the full polars traversal admitted it and
returned both endpoints where pandas keeps the arrival side (the flag prunes
by the hop labels polars defers). Now any hop with prune_to_endpoints is the
engine's typed NotImplementedError, and the plain single-hop predicate
declines it. Pins: polars raises on the seeded and unseeded single hop while
pandas answers [2, 3]; the predicate declines; the route corpus and the pandas
bypass table lose their #2053 known-divergence tags.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA
@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

GPU receipt (dgx-spark, graphistry/test-rapids-official:26.02-gfql-polars, cudf 26.02.01 / polars 1.35.2, safe_run, TEST_CUDF=1; suites test_chain.py, test_hop.py, test_chain_alias_column_collision.py, tests/compute/gfql/**) on the restacked stack head a54ac4b (#2065, containing #2055 rework, #2056, #2054, #2061, #2062): 13386 passed / 95 failed / 38 xfailed / 4 xpassed. 93 of the failures are master 86de0f5's polars-gpu fused-lane set (#2064, fixed separately in #2066). The other 2 are strict XPASS of the #2043 prune_to_endpoints markers on cuDF 26.02: the prune shapes now agree fast-vs-full on this stack (the #2062 closure fix removed the divergence), so #2062 drops that marker in a follow-up commit (tree otherwise identical; #2065 restacked).

@lmeyerov

lmeyerov commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

CI receipt at 730aadf (restacked): 67 check-runs success, 7 path-skipped as whole jobs. GPU receipt on the stack head above.

@lmeyerov
lmeyerov merged commit 730aadf into fix/gfql-2058-general-path-int-dtypes Sep 6, 2026
75 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.

1 participant