tustvold commented on issue #2581:
URL:
https://github.com/apache/arrow-datafusion/issues/2581#issuecomment-1135993475
> How will the projection appear for this?
In this case you have roots of
1. name
2. departments
And leaves of
1. name
2. department.id
3. department.name
So if say you projected with leaves `[1, 3]` you would get a schema of
```
Struct Employee {
name: String,
departments: Vec<ProjectedDepartment>
}
struct ProjectedDepartment {
name: String
}
```
Or in terms of the arrow datatype
```
DataType::Struct(vec![
Field("name", DataType::Utf8, <nullable>),
Field("departments", DataType::List(Box::new(
Field::new("element", DataType::Struct(vec![
Field::new("name", DataType::Utf8, <nullable>)
]), <nullable>)
)), <nullable>)
])
```
Does that make sense?
--
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]