soumya-ghosh commented on code in PR #1066:
URL: https://github.com/apache/iceberg-python/pull/1066#discussion_r1719782196


##########
pyiceberg/table/__init__.py:
##########
@@ -4393,12 +4397,12 @@ def _readable_metrics_struct(bound_type: PrimitiveType) 
-> pa.StructType:
                     "spec_id": data_file.spec_id,
                     "record_count": data_file.record_count,
                     "file_size_in_bytes": data_file.file_size_in_bytes,
-                    "column_sizes": dict(data_file.column_sizes),
-                    "value_counts": dict(data_file.value_counts),
-                    "null_value_counts": dict(data_file.null_value_counts),
-                    "nan_value_counts": dict(data_file.nan_value_counts),
-                    "lower_bounds": dict(data_file.lower_bounds),
-                    "upper_bounds": dict(data_file.upper_bounds),
+                    "column_sizes": dict(data_file.column_sizes) if 
data_file.column_sizes is not None else None,

Review Comment:
   Agreed.
   But these values are `null` when queried through Spark (Spark 3.5, Iceberg 
1.5.0), hence I am assigning them to `None` over here.
   <img width="1121" alt="Screenshot 2024-08-16 at 5 47 43 PM" 
src="https://github.com/user-attachments/assets/c5b63ad5-93a1-49b5-8072-ad385ddc609d";>
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to