Skip to content

Arrow compute kernel regards selection vector #4095

@yjshen

Description

@yjshen

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

It would be great if the arrow compute kernel could regard a selection vector. Then users won't need to create slices over the existing arrays before applying computations with the compute kernel.

Describe the solution you'd like

A set of new compute APIs that takes a selection vector as the second argument.

For example:

pub fn sum<T: ArrowNumericType>(array: &PrimitiveArray<T>, selection_vector: &BooleanArray) -> Option<T::Native>
where
    T::Native: ArrowNativeTypeOp,
{

Describe alternatives you've considered

Additional context

apache/datafusion#6003 as a use case where the selection vector would be beneficial.
apache/datafusion#5944 for a similar proposal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions