viirya commented on a change in pull request #1517:
URL: https://github.com/apache/arrow-rs/pull/1517#discussion_r840764248
##########
File path: parquet/src/arrow/array_reader/builder.rs
##########
@@ -698,7 +700,12 @@ impl<'a> ArrayReaderBuilder {
ArrowType::Struct(fields) => {
field = fields.iter().find(|f| f.name() == part)
}
- ArrowType::List(list_field) => field =
Some(list_field.as_ref()),
+ ArrowType::List(list_field) => match
list_field.data_type() {
+ ArrowType::Struct(fields) => {
+ field = fields.iter().find(|f| f.name() ==
part)
+ }
+ _ => field = Some(list_field.as_ref()),
+ },
Review comment:
This was tested by using the example in #1515. Not sure if it is easy to
add a unit test.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]