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


##########
parquet-variant/src/variant/metadata.rs:
##########
@@ -37,16 +37,16 @@ pub(crate) struct VariantMetadataHeader {
 const CORRECT_VERSION_VALUE: u8 = 1;
 
 // The metadata header occupies one byte; use a named constant for readability
-const NUM_HEADER_BYTES: usize = 1;
+const NUM_HEADER_BYTES: u32 = 1;
 
 impl VariantMetadataHeader {
     // Hide the cast
-    const fn offset_size(&self) -> usize {
-        self.offset_size as usize
+    const fn offset_size(&self) -> u32 {
+        self.offset_size as u32
     }
 
     // Avoid materializing this offset, since it's cheaply and safely 
computable
-    const fn first_offset_byte(&self) -> usize {
+    const fn first_offset_byte(&self) -> u32 {
         NUM_HEADER_BYTES + self.offset_size()
     }

Review Comment:
   Sounds like a good idea to me



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to