ritchie46 commented on a change in pull request #9778:
URL: https://github.com/apache/arrow/pull/9778#discussion_r607013890



##########
File path: rust/arrow/src/ffi.rs
##########
@@ -275,19 +336,19 @@ fn bit_width(data_type: &DataType, i: usize) -> 
Result<usize> {
         }
         // Variable-sized binaries: have two buffers.
         // "small": first buffer is i32, second is in bytes
-        (DataType::Utf8, 1) | (DataType::Binary, 1) => size_of::<i32>() * 8,
-        (DataType::Utf8, 2) | (DataType::Binary, 2) => size_of::<u8>() * 8,
-        (DataType::Utf8, _) | (DataType::Binary, _) => {
+        (DataType::Utf8, 1) | (DataType::Binary, 1) | (DataType::List(_), 1) 
=> size_of::<i32>() * 8,
+        (DataType::Utf8, 2) | (DataType::Binary, 2) | (DataType::List(_), 2) 
=> size_of::<u8>() * 8,

Review comment:
       Hmm.. I thought it was a [validity bitmap and an offset 
buffer](https://arrow.apache.org/docs/format/Columnar.html?highlight=list%20buffer#variable-size-list-layout)
 and that the child data was counted differently.
   
   What should be the correct number?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to