Skip to content

ZipExecuteAdaptor dispatches only on the if_true branch #10908

Closed

Description

@connortsui20

Problem or motivation

ZipExecuteAdaptor and ZipReduceAdaptor (vortex-array/src/scalar_fn/fns/zip/kernel.rs) run a ZipKernel or ZipReduce only when the encoded array is child 0, the if_true branch. An encoded array in the if_false branch never reaches its kernel, so the zip decodes it even when the kernel could handle it. All seven ZipKernel implementations have this gap.

#10891 ran into it for Widen. Covering if_false needed a second hand-written ExecuteParentKernel and an enum to put the branches back in order, so the PR dropped the if_false case instead.

Proposed solution

Let the adaptors handle child 1, as CompareExecuteAdaptor does in vortex-array/src/scalar_fn/fns/binary/compare/mod.rs. That adaptor normalizes the child index so that the encoded array always comes first, and it swaps the operator.

Zip cannot simply swap its branches, because the mask selects if_true. Inverting the mask does not work either: a null mask row selects if_false, and not keeps it null. So ZipKernel::zip and ZipReduce::zip need to know which branch the array is, for example through a branch argument.

Additional context

Found in #10891 (tracking issue #10733). Once this lands, the Widen zip kernel can cover if_false with no extra code.

Activity

  1. added a commit that references this issue on Nov 3, 2026
    7146a1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions