Skip to content

Conversation

@lyang24
Copy link
Contributor

@lyang24 lyang24 commented Dec 22, 2025

Which issue does this PR close?

Rationale for this change

clear a todo.

What changes are included in this PR?

Moved the core implementation from RunArray to RunEndBuffer

Are these changes tested?

this is a simple refactor

Are there any user-facing changes?

no

@github-actions github-actions bot added the arrow Changes to the arrow crate label Dec 22, 2025
@lyang24 lyang24 force-pushed the refactor_get_physical_indexes branch from c7a40cd to f01df57 Compare December 22, 2025 03:15
///
/// Returns an error if any logical index is out of bounds (>= self.len()).
#[inline]
pub fn get_physical_indices<I>(&self, logical_indices: &[I]) -> Result<Vec<usize>, String>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could have return type as Result<Vec<usize>, I>, and return the offending input logical index that caused the error instead of a string message? Leave it up to consumers to format their own message 🤔

Copy link
Contributor Author

@lyang24 lyang24 Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@lyang24 lyang24 force-pushed the refactor_get_physical_indexes branch from f01df57 to 3266580 Compare December 22, 2025 08:37
Signed-off-by: lyang24 <lanqingy93@gmail.com>
@lyang24 lyang24 force-pushed the refactor_get_physical_indexes branch from 3266580 to 7bda254 Compare December 22, 2025 12:18
@alamb alamb merged commit 34337d2 into apache:main Dec 23, 2025
26 checks passed
@alamb
Copy link
Contributor

alamb commented Dec 23, 2025

Thanks @lyang24 and @Jefffrey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move RunArray::get_physical_indices to RunEndBuffer

3 participants