HaoYang670 commented on code in PR #1988:
URL: https://github.com/apache/arrow-rs/pull/1988#discussion_r912364388


##########
arrow/src/array/builder/fixed_size_list_builder.rs:
##########
@@ -132,15 +125,13 @@ where
             .finish();
         let values_data = values_arr.data();
 
-        // check that values_data length is multiple of len if we have data
-        if len != 0 {
-            assert!(
-                values_data.len() / len == self.list_len as usize,

Review Comment:
   There was a bug when `values_data.len() / len == self.list_len` but 
`values_data.len() % len != 0`.
   Checking `values_data.len() == len * self.list_len` is more straightforward.
   



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