Skip to content

fix(gfql): apply single-alias predicate pushdown masks by position (#2020) - #2045

Merged
lmeyerov merged 4 commits into
masterfrom
fix/gfql-2020-alias-prefilter-alignment
Sep 5, 2026
Merged

fix(gfql): apply single-alias predicate pushdown masks by position (#2020)#2045
lmeyerov merged 4 commits into
masterfrom
fix/gfql-2020-alias-prefilter-alignment

Conversation

@lmeyerov

@lmeyerov lmeyerov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

MATCH (a)-[e]->(t) WHERE a.type IN [...] AND e.e_type IN [...] AND t.type IN [...] RETURN t.id raised GFQLTypeError [invalid-node-reference] ... Unalignable boolean Series provided as indexer on pandas (and cuDF) while polars answered. The single-alias predicate pushdown filtered the alias frame with frame.loc[mask]; once an earlier pushdown had narrowed that frame, its labels were no longer a RangeIndex, while the mask evaluated on the renamed view came back with a fresh positional index, so label alignment failed. A mask computed on the same rows is positional by contract, so both pushdown sites (expression and searchAny) now keep rows by position through one helper typed with the repo's engine-agnostic aliases.

Pins (test_alias_prefilter_alignment_2020.py): the issue's query returns ['tx1'] on pandas, polars, cuDF; equals the scalar = form; and survives a node frame whose index is neither ranged nor ordered. Row-pipeline, lowering, alias-scoping, optional-match and multiplicity suites pass locally (1885; the two cuDF t6 lowering failures are the dev-box libcublas environment, identical on master). Real-GPU run to follow on dgx.

Fixes #2020.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA

@lmeyerov

lmeyerov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Real-GPU receipt (dgx-spark, RAPIDS 26.02 image, cudf 26.02.01): test_alias_prefilter_alignment_2020.py + tests/compute/gfql/row + polars alias-prefilter + cypher/test_lowering.py at 06e1f48 = 1689 passed, 0 failed; the 5 skips are igraph-only lowering tests (this image has no python-igraph), not GPU skips.

@lmeyerov

lmeyerov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

READY (84ce9d0): 77/77; positional pushdown mask (#2020) with pins on pandas/polars/cuDF; real-GPU 1689 passed (igraph-only skips); SeriesT/DataFrameT typed, no new ignore.

lmeyerov and others added 3 commits September 5, 2026 13:14
…2020)

After an earlier pushdown narrowed an alias frame, the next mask (evaluated
on a renamed view) carried a fresh RangeIndex while the frame kept filtered
labels, so pandas/cuDF raised Unalignable boolean Series. A mask computed on
the same rows is positional by contract; keep rows by position.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QztW7jYsDd66e8rb8pJNQA
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-2020-alias-prefilter-alignment branch from 90d018c to 9950d68 Compare September 5, 2026 20:14
@lmeyerov
lmeyerov merged commit 6417cdd into master Sep 5, 2026
78 checks passed
@lmeyerov
lmeyerov deleted the fix/gfql-2020-alias-prefilter-alignment branch September 5, 2026 20:39
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 cypher pandas: three IN predicates across (a)-[e]->(t) crash with 'Unalignable boolean Series' (polars OK)

1 participant