viirya commented on code in PR #2042: URL: https://github.com/apache/arrow-rs/pull/2042#discussion_r918164962
########## arrow/src/ffi.rs: ########## @@ -348,11 +352,18 @@ fn bit_width(data_type: &DataType, i: usize) -> Result<usize> { data_type, i ))) }, + // Variable-size list and map have one i32 buffer. // Variable-sized binaries: have two buffers. // "small": first buffer is i32, second is in bytes - (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: According to Arrow spec, variable-size list has only one i32 buffer (except for null buffer). This was incorrect. Although we actually iterator array data's buffers so it won't hit issue, it is better to correct it here. -- 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