Repository navigation
Commit 7b36f7f
authored
fix(array): preserve constants when zip selects one branch (#11373)
When zip's mask is uniformly true or false (including null masks, which
select the false branch), executing the selected ConstantArray
materializes it unnecessarily. Scalar access then logs `Scalar function
vortex.zip() returned non-constant array from execution over all scalar
inputs`.
Return the selected branch cast to the output dtype without executing it
again. Removing the zip node already makes execution progress; the
caller can preserve constants with `Columnar` or continue materializing
with `Canonical`.
Added a parameterized regression test for true, false, and null masks,
with matching branch types and with nullable/non-nullable branches. It
checks constant encoding, values, and output nullability.
Validation: reviewed the patch and execution paths. Tests, formatting,
and lints were not run locally, following AGENTS.md's instruction to
leave verification execution to the user.
Implemented and opened by Codex at Daniel King's request. Daniel King
(@danking) is the responsible human.
Signed-off-by: Daniel King <[email protected]>1 parent 2e1b05b commit 7b36f7f
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
353 | 354 | | |
354 | 355 | | |
355 | 356 | | |
| 357 | + | |
356 | 358 | | |
357 | 359 | | |
358 | 360 | | |
| |||
437 | 439 | | |
438 | 440 | | |
439 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
440 | 466 | | |
441 | 467 | | |
442 | 468 | | |
| |||
0 commit comments