Skip to content

Move RunArray::get_physical_indices to RunEndBuffer #9025

@Jefffrey

Description

@Jefffrey

Original context: https://github.com/apache/arrow-rs/pull/9019/changes#r2635583677

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

The RunArray::get_physical_indices method technically operates solely on the RunEndBuffer of the array:

// TODO: this technically should be a method on RunEndBuffer
#[inline]
pub fn get_physical_indices<I>(&self, logical_indices: &[I]) -> Result<Vec<usize>, ArrowError>
where
I: ArrowNativeType,
{
let len = self.run_ends().len();
let offset = self.run_ends().offset();

Describe the solution you'd like

Move this implementation to RunEndBuffer, and leave RunArray::get_physical_indices as a thin wrapper. Maybe also deprecate it?

Describe alternatives you've considered

Additional context

No sure how it affects inlining, since we do have the #[inline] attribute present 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changeloggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions