jorgecarleitao commented on a change in pull request #9778:
URL: https://github.com/apache/arrow/pull/9778#discussion_r607017599
##########
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 is the buffer 0, the offsets the buffer 1. The List has no
buffer number two. If someone requests buffer 2 from a List Array, we should
error instead.
--
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]