Fokko commented on issue #2263: URL: https://github.com/apache/iceberg-python/issues/2263#issuecomment-3152179477
This is a great catch @berg2043, thanks for reporting. I think a simple fix like: ``` diff --git a/pyiceberg/io/pyarrow.py b/pyiceberg/io/pyarrow.py index 27973710..ad0b68e2 100644 --- a/pyiceberg/io/pyarrow.py +++ b/pyiceberg/io/pyarrow.py @@ -2419,8 +2419,8 @@ def data_file_statistics_from_parquet_metadata( if isinstance(stats_col.iceberg_type, DecimalType) and statistics.physical_type != "FIXED_LEN_BYTE_ARRAY": scale = stats_col.iceberg_type.scale - col_aggs[field_id].update_min(unscaled_to_decimal(statistics.min_raw, scale)) - col_aggs[field_id].update_max(unscaled_to_decimal(statistics.max_raw, scale)) + col_aggs[field_id].update_min(unscaled_to_decimal(statistics.min_raw, scale) if statistics.min_raw is not None else None) + col_aggs[field_id].update_max(unscaled_to_decimal(statistics.max_raw, scale) if statistics.max_raw is not None else None) else: col_aggs[field_id].update_min(statistics.min) col_aggs[field_id].update_max(statistics.max) ``` Would fix this 👍 Are you interested in working on this? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org