Commit 24ce01f
committed
review(#1783): fix a silent no-op on float indexes; drop a dead guard; pin edge order
Review skill found no correctness defect (the adversarial question — is how='left'
really the only consumer of _lean_prefilter_right — came back CONFIRMED: one
non-test caller, the local is dead on the next line, and every other merge in
chain.py builds its right side independently). These are the quality items.
1. `right[0:0]` is LABEL-based slicing on a float index — pandas routes those
through slice_indexer — so it returned ONE row and the shrink silently did
nothing. Now `right.iloc[0:0]`, positional on every index type. The RESULT was
always correct (a 0-row left yields a 0-row how='left' merge either way), which
is why this needed its own test: the bug was an invisible perf no-op, not a
wrong answer. Mutation-checked — reverting to `[0:0]` fails the new test.
2. Docstring said "Only shrinks when `left` is materially smaller", which the new
empty-left branch contradicts. Restated, and now records that the whole helper
is pandas-only in practice (`_lean_engine_ok` is checked first), so there is no
cross-engine exposure.
3. Removed `if added_edge_index and EID != EORD:` — dead by construction, since the
only branch setting added_edge_index also sets EORD = EID.
lint clean; 1022 lean-combine + polars-chain tests pass.1 parent 7ea421a commit 24ce01f
3 files changed
Lines changed: 33 additions & 5 deletions
File tree
- graphistry
- compute
- gfql/lazy/engine/polars
- tests/compute
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
114 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
955 | 955 | | |
956 | 956 | | |
957 | 957 | | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
958 | 961 | | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
0 commit comments