thinkharderdev opened a new issue, #7474: URL: https://github.com/apache/arrow-rs/issues/7474
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> Came up when working on https://github.com/apache/datafusion/pull/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** <!-- A clear and concise description of what you want to happen. --> ``` 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** <!-- A clear and concise description of any alternative solutions or features you've considered. --> Can do it like it's done in the above PR by deriving at runtime based on `IS_LARGE` **Additional context** <!-- Add any other context or screenshots about the feature request here. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
