Repository navigation
fix(array): preserve constants when zip selects one branch - #11373
Conversation
Signed-off-by: Daniel King <dan@spiraldb.com>
Merging this PR will improve performance by 19.55%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
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
Columnaror continue materializing withCanonical.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.