ritchie46 commented on a change in pull request #9778:
URL: https://github.com/apache/arrow/pull/9778#discussion_r603335205
##########
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:
Yes, and I also found that we need to send that to C++ as well.
Currently we set the
[flags](https://arrow.apache.org/docs/format/CDataInterface.html#c.ArrowSchema.flags)
to 0 (omitting info).
In the latest
[push](https://github.com/apache/arrow/pull/9778/commits/26268c9766ff3e91295f962cf492bf2a99502774)
I set it to `2` (nullable), and that fixed it. I will see if I can determine
that information from the existing data.
--
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]