Jefffrey commented on code in PR #11070:
URL: https://github.com/apache/arrow-rs/pull/11070#discussion_r4060669732


##########
arrow-array/src/array/fixed_size_list_array.rs:
##########
@@ -662,7 +671,6 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(3, list_array.len());
         assert_eq!(0, list_array.null_count());
-        assert_eq!(6, list_array.value_offset(2));

Review Comment:
   we should restore these tests using `value_offset_at` instead



##########
arrow-select/src/take.rs:
##########
@@ -1467,7 +1467,9 @@ where
                 .value(i)
                 .to_usize()
                 .ok_or_else(|| ArrowError::ComputeError("Cast to usize 
failed".to_string()))?;
-            let start = list.value_offset(index) as <UInt32Type as 
ArrowPrimitiveType>::Native;
+            let start = u32::try_from(index * list.value_length() as 
usize).map_err(|_| {

Review Comment:
   ```suggestion
               let start = 
u32::try_from(list.value_offset_at(index)).map_err(|_| {
   ```



##########
arrow-array/src/builder/fixed_size_list_builder.rs:
##########
@@ -442,7 +437,6 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(6, list_array.len());
         assert_eq!(2, list_array.null_count());
-        assert_eq!(6, list_array.value_offset(2));

Review Comment:
   ditto



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