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
[Python] Expose more metadata in pyarrow.parquet.ParquetFile.metadata #34180
I'm not sure if this issue pertains to all implementations of arrow including pyarrow or just c++ but related to this #14870
I'm guessing it affects pyarrow as pq.ParquetFile.metadata.to_dict()['row_groups'][0]['columns'][0]['statistics'].keys()
doesn't have the min_value, max_value keys.
So the feature request is to include min_value and max_value in that metadata.
Additionally, I think there's metadata on whether or not a column is sorted (I might be confused on that point) but if there is it'd be good to see that too.
changed the title [-]Expose more metadata in pyarrow.parquet.ParquetFile.metadata[/-][+][Python] Expose more metadata in pyarrow.parquet.ParquetFile.metadata[/+]on Feb 14, 2023
@deanm0000 the statistics indeed don't have those exact min_value / max_value keys, but it does have min / max and min_raw / max_raw keys. Does those already do what you are looking for?
(it seems the _raw ones are only available as attribute on the object (eg meta.row_group(0).column(0).statistics.min_raw), and not in the dict)
So my thoughts are that some readers and optimizers use the "newer" min_value and max_value stats when they plan queries and filters. (Hopefully pyarrow.dataset is included in that or will be). I'd like a way to verify that my parquet files have those stats. Since the min and max stats are deprecated it seems fewer libraries are going to even look at those if they exist. As to the min_raw and max_raw, I've never heard of them so I'm not sure how valuable they are.
Starting from the next version (#34112), the min/max python attributes will check for min_value/max_value in the actual parquet metadata, if they are present, and otherwise fallback to the deprecated min/max values.
Yes, AFAIK we have been writing those values for a long time. As a quick test using pyarrow 1.0 (from almost 3 years ago), writing a small table, and inspecting the thrift metadata of the file with parquet-tools, both min/max and min_value/max_value are set.
This issue has been marked as stale because it has had no activity in the past 2 years. Please remove the stale label or comment below, or this issue will be closed in 14 days.
Activity
[-]Expose more metadata in pyarrow.parquet.ParquetFile.metadata[/-][+][Python] Expose more metadata in pyarrow.parquet.ParquetFile.metadata[/+]jorisvandenbossche commentedon Feb 14, 2023
@deanm0000 the statistics indeed don't have those exact min_value / max_value keys, but it does have
min/maxandmin_raw/max_rawkeys. Does those already do what you are looking for?(it seems the
_rawones are only available as attribute on the object (egmeta.row_group(0).column(0).statistics.min_raw), and not in the dict)deanm0000 commentedon Feb 15, 2023
So my thoughts are that some readers and optimizers use the "newer"
min_valueandmax_valuestats when they plan queries and filters. (Hopefully pyarrow.dataset is included in that or will be). I'd like a way to verify that my parquet files have those stats. Since theminandmaxstats are deprecated it seems fewer libraries are going to even look at those if they exist. As to themin_rawandmax_raw, I've never heard of them so I'm not sure how valuable they are.jorisvandenbossche commentedon Feb 15, 2023
Starting from the next version (#34112), the min/max python attributes will check for min_value/max_value in the actual parquet metadata, if they are present, and otherwise fallback to the deprecated min/max values.
deanm0000 commentedon Feb 17, 2023
Does the writer write min_value/max_value and if so has it done that for a while?
jorisvandenbossche commentedon Feb 28, 2023
Yes, AFAIK we have been writing those values for a long time. As a quick test using pyarrow 1.0 (from almost 3 years ago), writing a small table, and inspecting the thrift metadata of the file with parquet-tools, both min/max and min_value/max_value are set.
thisisnic commentedon Feb 18, 2026
This issue has been marked as stale because it has had no activity in the past 2 years. Please remove the stale label or comment below, or this issue will be closed in 14 days.