Nested types and extension types are not supported in `Statistics` / `ColumnStatistics`
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
The current `ColumnStatistics` structure is not able to represent nested types (e.g., list, map, or struct) for which statistics are present in Parquet data sources and perhaps others as well.
https://github.com/apache/datafusion/blob/d025869526e5c7c2c32d5f6318a634522d44a538/datafusion/common/src/stats.rs#L724-L752
In addition to list/struct/map statistics, the `Statistics` struct can't represent statistics for extension types. Three extension types for which we can get statistics from Parquet files are geometry, geography, and variant; however, there is no place to put them in the Statistics so they are dropped.
One approach for doing this is in https://github.com/apache/datafusion/pull/20589 , although I wonder if something dynamic could work as well (e.g., a trait with methods for the transformations that are currently hard coded for a fixed set of types).
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start with datafusion/common/src/stats.rs, especially the ColumnStatistics and Statistics definitions referenced in the issue, then review the approach in pull request 20589 and how Parquet statistics are handled. Done means nested list, map, and struct statistics plus geometry, geography, and variant extension-type statistics can be represented without being dropped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100