You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimized decoding of Parquet Statistics, null_pages and null_counts #9296
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently, if using statistics, a lot of time can be spent decoding/summarizing the statistics from the ValueStatistics / Statistics structs (which are large / inefficient structs).
In DataFusion this can sometimes take as much time running the query (or more if the query can be answered from statistics directly).
Describe the solution you'd like
We should consider decoding the statistics into a columnar format (values + null bitmap (if needed)) directly, avoiding needing to convert this later (and possibly help decoding as well a bit as well as memory usage).
null_pages: this currently is a Vec<bool> (true is null, false is non-null), it would be better to save this as a NullBuffer or similar, where true means valid and false means invalid - this would make it possible to copy the null bitmap without conversion
null_counts: Option<Vec>: it would be better to have this as a Int64Array or similar (Or preferably even Uint64Array if we can do the conversion earlier)
null_pages: this currently is a Vec<bool> (true is null, false is non-null), it would be better to save this as a NullBuffer or similar, where true means valid and false means invalid - this would make it possible to copy the null bitmap without conversion and also lowers memory usage a bit
null_counts: Option<Vec>: it would be better to have this as a Int64Array or similar (Or preferably even Uint64Array if we can do the conversion earlier)
changed the title [-]Optimized encoding of Parquet `null_pages` and `null_counts`[/-][+]Optimized decoding of Parquet `null_pages` and `null_counts`[/+]on Jan 30, 2026
changed the title [-]Optimized decoding of Parquet `null_pages` and `null_counts`[/-][+]Optimized decoding of Parquet Statistics, `null_pages` and `null_counts`[/+]on Feb 2, 2026
There's also #8818 to consider. My issue with doing the conversion here rather than using StatisticsConverter is that we then have an arrow dependency in the parquet metadata. I like @alamb's suggestion...skip parsing the page indexes via ParquetMetaDataPushDecoder and add functionality to the arrow reader to parse the column index straight to arrow arrays. This preserves the current form of the indexes for those not using the arrow reader at all.
Activity
[-]Columnar encoding of statistics[/-][+]Columnar encoding of Parquet statistics[/+]mkleen commentedon Jan 29, 2026
take
mkleen commentedon Jan 30, 2026
Can we specify this a little more? This would really help me. Thanks a lot!
[-]Columnar encoding of Parquet statistics[/-][+]Optimized encoding of Parquet statistics[/+][-]Optimized encoding of Parquet statistics[/-][+]Optimized encoding of Parquet `null_pages` and `null_counts`[/+]Dandandan commentedon Jan 30, 2026
Yeah sure - I do understand the needs a bit better after looking at #9303
Looking at
ColumnIndex:null_pages: this currently is aVec<bool>(true is null, false is non-null), it would be better to save this as aNullBufferor similar, wheretruemeans valid andfalsemeans invalid - this would make it possible to copy the null bitmap without conversion and also lowers memory usage a bitnull_counts: Option<Vec>: it would be better to have this as aInt64Arrayor similar (Or preferably evenUint64Arrayif we can do the conversion earlier)[-]Optimized encoding of Parquet `null_pages` and `null_counts`[/-][+]Optimized decoding of Parquet `null_pages` and `null_counts`[/+]alamb commentedon Jan 30, 2026
FYI @etseidl who also has a (potentially unhealthy) fascination with Parquet statistics
Optimize data page statistics conversion (up to 4x) (#9303)
[-]Optimized decoding of Parquet `null_pages` and `null_counts`[/-][+]Optimized decoding of Parquet Statistics, `null_pages` and `null_counts`[/+]alamb commentedon Feb 2, 2026
This also came up here:
alamb commentedon Feb 2, 2026
My personal suggestion is:
This would solve several sources of inefficiency today:
I think the API design is probably the trickiest part of this project
docs: Update roadmap with Apache Arrow contribution strategy
mkleen commentedon Mar 23, 2026
I would like to resign from this task. I currently don't have enough time to work on this since apache/datafusion#20047 takes me longer than expected.
alamb commentedon Mar 24, 2026
Thanks @mkleen
etseidl commentedon Mar 24, 2026
There's also #8818 to consider. My issue with doing the conversion here rather than using
StatisticsConverteris that we then have an arrow dependency in the parquet metadata. I like @alamb's suggestion...skip parsing the page indexes viaParquetMetaDataPushDecoderand add functionality to the arrow reader to parse the column index straight to arrow arrays. This preserves the current form of the indexes for those not using the arrow reader at all.mkleen commentedon Mar 25, 2026
@alamb Can you unassign me please?
mkleen commentedon Sep 27, 2026
take
feat(parquet): decode ColumnIndex bytes straight into Arrow arrays
bench(parquet): Add page index statistics decoding benchmark (#11287)
feat(parquet): decode ColumnIndex bytes straight into Arrow arrays