rluvaton commented on code in PR #9079:
URL: https://github.com/apache/arrow-rs/pull/9079#discussion_r2687814113


##########
arrow-row/src/lib.rs:
##########
@@ -1156,6 +1161,29 @@ impl Rows {
         }
     }
 
+    /// Returns the length of the row at index `row` in bytes

Review Comment:
   Rephrased



##########
arrow-row/src/lib.rs:
##########
@@ -1156,6 +1161,29 @@ impl Rows {
         }
     }
 
+    /// Returns the length of the row at index `row` in bytes
+    pub fn row_len(&self, row: usize) -> usize {
+        assert!(row + 1 < self.offsets.len());
+
+        unsafe { self.row_len_unchecked(row) }
+    }
+
+    /// Returns the length of the row at `index` in bytes without bounds 
checking
+    ///
+    /// # Safety
+    /// Caller must ensure that `index` is less than the number of offsets 
(#rows + 1)
+    pub unsafe fn row_len_unchecked(&self, index: usize) -> usize {

Review Comment:
   removed the unchecked version and only kept `row_len`



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