binayakd commented on code in PR #1354: URL: https://github.com/apache/iceberg-python/pull/1354#discussion_r1855024655
########## tests/io/test_pyarrow_stats.py: ########## @@ -681,6 +685,39 @@ def test_stats_types(table_schema_nested: Schema) -> None: ] +def test_read_missing_statistics() -> None: + # write statistics for only for "strings" column + metadata, table_metadata = construct_test_table(write_statistics=["strings"]) + + # expect only "strings" column to have statistics in metadata + assert metadata.row_group(0).column(0).is_stats_set is True + assert metadata.row_group(0).column(0).statistics is not None + + # expect all other columns to have no statistics + for r in range(metadata.num_row_groups): + for pos in range(1, metadata.num_columns): + assert metadata.row_group(r).column(pos).is_stats_set is False + assert metadata.row_group(r).column(pos).statistics is None Review Comment: Pushed the change to combine the checks as you suggested. Thanks! -- 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