-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
arrowChanges to the arrow crateChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelogAny new improvement worthy of a entry in the changelog
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Came up when working on apache/datafusion#15968. Since working with native code offsets will generally be usize it would be nice to have generic way to get max usize value for OffsetSizeTrait instead of deriving it at runtime
Describe the solution you'd like
pub trait OffsetSizeTrait: ArrowNativeType + std::ops::AddAssign + Integer {
const MAX_OFFSET:usize
...
}
impl OffsetSizeTrait for i32 {
const MAX_OFFSET: usize = i32::MAX as usize;
..
}
impl OffsetSizeTrait for i64 {
const MAX_OFFSET: usize = i64::MAX as usize;
..
}
Describe alternatives you've considered
Can do it like it's done in the above PR by deriving at runtime based on IS_LARGE
Additional context
Metadata
Metadata
Assignees
Labels
arrowChanges to the arrow crateChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelogAny new improvement worthy of a entry in the changelog