Commit 8d8b9d9
committed
review(#1785): pin the edge sort under streaming; scope the survivor claim; kill the twin guard
Review skill found three items worth fixing; all three were claim-scope or
follow-up-hazard rather than defects in the shipped behaviour.
1. `sort(EORD)` is NOT dead code — the probe that called it unpinned was engine
blind. It only exercised the in-memory collect, where the frame comes back
EORD-ordered even with the sort deleted. Under `GFQL_POLARS_CPU_STREAMING=1`
it does not, and a trailing rows(limit=)/skip would then slice the wrong rows.
The existing 60k order test is now parametrized over the collect engine.
Mutation-checked: deleting the sort fails [streaming] and PASSES [in-memory],
which is exactly why the original probe saw nothing.
2. The `maintain_order=True` docstring claimed the surviving duplicate is decided
"the same way it was before", citing a 400-combo A/B. That A/B ran on the
default engine only; under streaming the survivor genuinely differs. Scoped the
claim to the in-memory collect and said plainly that the survivor is a stable
property there, not a guaranteed one.
3. `_apply_node_names` still carried the ORIGINAL spelling of the bug this branch
exists to fix: `is_lazy(df) or df.height > 0`, where the function is always
called with lazified steps, so `is_lazy` short-circuits True and the height test
is unreachable. Restated against `edges_empty`, which survives lazification.
Unlike the edges combine this guard is SEMANTIC, not a cost guard — an empty
next edge step must not empty `named` through the gate below it. I could not
make the dead version observable, so this is hardening, not a bug fix; but
leaving a known-dead cardinality guard beside a freshly-revived one is precisely
how the original defect recurred.
lint + mypy clean; 1159 polars chain/combine/semi-dedup tests pass.1 parent ebfa720 commit 8d8b9d9
2 files changed
Lines changed: 31 additions & 6 deletions
File tree
- graphistry
- compute/gfql/lazy/engine/polars
- tests/compute/gfql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
399 | 403 | | |
400 | 404 | | |
401 | 405 | | |
402 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
403 | 416 | | |
404 | 417 | | |
405 | 418 | | |
| |||
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
344 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
345 | 353 | | |
346 | 354 | | |
347 | 355 | | |
| |||
350 | 358 | | |
351 | 359 | | |
352 | 360 | | |
353 | | - | |
354 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
355 | 367 | | |
356 | 368 | | |
357 | 369 | | |
| |||
0 commit comments