alamb commented on code in PR #7478:
URL: https://github.com/apache/arrow-rs/pull/7478#discussion_r2078457748


##########
arrow-array/src/array/list_array.rs:
##########
@@ -42,16 +42,20 @@ pub trait OffsetSizeTrait: ArrowNativeType + 
std::ops::AddAssign + Integer {
     const IS_LARGE: bool;
     /// Prefix for the offset size
     const PREFIX: &'static str;
+    /// The max `usize` offset
+    const MAX_OFFSET: usize;
 }
 
 impl OffsetSizeTrait for i32 {
     const IS_LARGE: bool = false;
     const PREFIX: &'static str = "";
+    const MAX_OFFSET: usize = i32::MAX as usize;

Review Comment:
   maybe it would make sense to add this as `u64` rather than `usize` so it 
works on 32 bit platforms like wasm



-- 
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]

Reply via email to