jorgecarleitao commented on a change in pull request #9778:
URL: https://github.com/apache/arrow/pull/9778#discussion_r603331386
##########
File path: rust/arrow/src/ffi.rs
##########
@@ -193,6 +206,20 @@ fn to_datatype(format: &str) -> Result<DataType> {
"ttm" => DataType::Time32(TimeUnit::Millisecond),
"ttu" => DataType::Time64(TimeUnit::Microsecond),
"ttn" => DataType::Time64(TimeUnit::Nanosecond),
+
+ // Note: The datatype null will only be created when called from
ArrowArray::buffer_len
+ // at that point the child data is not yet known, but it is also not
required to determine
+ // the buffer length of the list arrays.
+ "+l" => DataType::List(Box::new(Field::new(
+ "item",
+ child_type.unwrap_or(DataType::Null),
+ true,
+ ))),
+ "+L" => DataType::LargeList(Box::new(Field::new(
+ "item",
+ child_type.unwrap_or(DataType::Null),
+ true,
+ ))),
Review comment:
@ritchie46 IMO the issue may be here: we need to re-build the entire
field (name and nullability) from the schema, not just the datatype. cc @pitrou
.
--
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]