pitrou commented on a change in pull request #9778:
URL: https://github.com/apache/arrow/pull/9778#discussion_r607015198
##########
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:
The validity bitmap is buffer 0 and the offsets are buffer 1. You are
defining a buffer 2 (of `u8`) which doesn't exist.
--
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]