Skip to content

perf(gfql): seeded fast path covers single-alias property RETURNs — LDBC IS5 shape (#1755) - #1766

Merged
lmeyerov merged 3 commits into
masterfrom
perf/gfql-seeded-projection-slice
Jul 22, 2026
Merged

lmeyerov merged 3 commits into
masterfrom
perf/gfql-seeded-projection-slice

Conversation

@lmeyerov

Copy link
Copy Markdown
Contributor

What

Property RETURNs (RETURN p.a AS x, p.b) lower to rows(source=alias)+select(items), not a result_projection — so the seeded typed-hop fast path's whole-row-only gate never saw them. The dispatcher now also accepts the 5-op [n0, e1, n2, rows, select] shape when every select item is a same-alias property present on the node frame, and projects directly from the deduped destination rows.

Decline gates (full path keeps its semantics)

Cross-alias refs (RETURN m.x, p.y — the IS1 shape, NOT covered), mixed whole-row+property, DISTINCT/ORDER BY/LIMIT (extra lowered ops), expr items, absent properties (full path's null/error semantics must apply), plus every existing gate (policy, WHERE, OPTIONAL null row, reentry seeds, varlen, undirected, mixed engines).

Verification

  • Differential fast-vs-full sweep on pandas + polars across all covered and declined shapes: exact parity, engagement asserted both ways (TestSeededPropertyProjection; full seeded suite 84 green).
  • LDBC SNB SF1 on dgx (harness row-validated): message-creator (IS5) 116.3 → 38.3 ms (residue = seed scan at SF1 scale without a resident index — the follow-up lever). seed-lookup (IS1, cross-alias) unchanged by design.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y6dQEcjdazEnzuvuwf73ZL

lmeyerov and others added 3 commits July 21, 2026 16:46
…5 shape) (#1755)

Property RETURNs lower to rows(source=alias)+select(items), not a
result_projection - the previous whole-row-only gate never saw them. The
dispatcher now accepts the 5-op [n0,e1,n2,rows,select] shape when every
select item is a same-alias property present on the node frame, and emits
the projection directly from the deduped destination rows. Declines (full
path) for cross-alias refs, mixed whole+prop, DISTINCT/ORDER BY/LIMIT,
exprs, and absent properties. Differential sweep pandas+polars: exact
parity, engagement asserted both ways (TestSeededPropertyProjection).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6dQEcjdazEnzuvuwf73ZL
…me, engine-mismatch decline

Review-skill findings (plans/review-pr-1766/review.md):
B1 int/bool property dtypes diverged from the full pandas path (rows-pivot
upcasts non-id int/float->float64, bool->object; id keeps dtype). The lean
tail now applies the same casts; unverified dtype classes (datetimes,
extension dtypes, categoricals) decline to the full path.
M1 res._edges was None where the full path yields an empty edges frame;
now the helper edges' zero-row head.
M2 requested-vs-actual engine mismatch (e.g. polars frames + engine=
'pandas') declines — the full path converts to the requested engine.
M3 CHANGELOG corrected to the measured 116.3->38.3ms (was 'low
single-digit ms').

Pinned in TestSeededProjectionDtypeAndEdgesParity (dtype parity pandas+
polars, datetime decline, edges empty-not-None, both mismatch directions),
all engagement-asserted. 14-case fast-vs-full probe matrix: exact parity.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6dQEcjdazEnzuvuwf73ZL
…lt str dtype)

CI py3.12/3.14 lanes run pandas 3, where every string column is the
StringDtype-family 'str' dtype -- the extension-dtype decline disengaged
the whole IS5 shape (engaged=0 in test_is5_shape_engages_and_matches).
The rows-pivot preserves StringDtype on BOTH pandas 2 ('string') and
pandas 3 ('str'), verified by differential in a pandas 3.0.3 env, so it
passes through un-cast. Pinned.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y6dQEcjdazEnzuvuwf73ZL
@lmeyerov
lmeyerov merged commit 6b83102 into master Jul 22, 2026
69 checks passed
@lmeyerov
lmeyerov deleted the perf/gfql-seeded-projection-slice branch July 22, 2026 02:10
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