This is an automated email from the ASF dual-hosted git repository. fokko pushed a commit to branch pyiceberg-0.9.x in repository https://gitbox.apache.org/repos/asf/iceberg-python.git
commit ddd72250d254dfe31b38656986a6fcf0794bdd42 Author: Akashdeep Gupta <[email protected]> AuthorDate: Thu Apr 17 02:15:02 2025 +0530 Fix for metadata entries table for MOR tables containing Delete Files. (#1902) <!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> Closes #1884 # Rationale for this change table.inspect.entries() fails when table is MOR table and has Delete Files present in it. Iceberg MOR Table is created via Apache Spark 3.5.0 with Iceberg 1.5.0 and it's being read via PyIceberg 0.9.0 using StaticTable.from_metadata() # Are these changes tested? Yes # Are there any user-facing changes? No <!-- In the case of user-facing changes, please add the changelog label. --> --- pyiceberg/table/inspect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyiceberg/table/inspect.py b/pyiceberg/table/inspect.py index 91bdb2f2..b850aa10 100644 --- a/pyiceberg/table/inspect.py +++ b/pyiceberg/table/inspect.py @@ -205,9 +205,9 @@ class InspectTable: "record_count": entry.data_file.record_count, "file_size_in_bytes": entry.data_file.file_size_in_bytes, "column_sizes": dict(entry.data_file.column_sizes), - "value_counts": dict(entry.data_file.value_counts), - "null_value_counts": dict(entry.data_file.null_value_counts), - "nan_value_counts": dict(entry.data_file.nan_value_counts), + "value_counts": dict(entry.data_file.value_counts or {}), + "null_value_counts": dict(entry.data_file.null_value_counts or {}), + "nan_value_counts": dict(entry.data_file.nan_value_counts or {}), "lower_bounds": entry.data_file.lower_bounds, "upper_bounds": entry.data_file.upper_bounds, "key_metadata": entry.data_file.key_metadata,
