2626from pyiceberg .catalog import Catalog , load_catalog
2727from pyiceberg .io .pyarrow import PyArrowFileIO
2828from pyiceberg .manifest import (
29- DataFile ,
30- ManifestEntry ,
3129 data_file_with_partition ,
3230 manifest_entry_schema_with_data_file ,
3331 write_manifest ,
@@ -66,38 +64,15 @@ def test_write_sample_manifest(table_test_all_types: Table, compression: AvroCom
6664 entry = test_manifest_entries [0 ]
6765 test_schema = table_test_all_types .schema ()
6866 test_spec = table_test_all_types .spec ()
69- data_file_v2 = DataFile .from_args (
70- _table_format_version = 2 ,
71- content = entry .data_file .content ,
72- file_path = entry .data_file .file_path ,
73- file_format = entry .data_file .file_format ,
74- partition = entry .data_file .partition ,
75- record_count = entry .data_file .record_count ,
76- file_size_in_bytes = entry .data_file .file_size_in_bytes ,
77- column_sizes = entry .data_file .column_sizes ,
78- value_counts = entry .data_file .value_counts ,
79- null_value_counts = entry .data_file .null_value_counts ,
80- nan_value_counts = entry .data_file .nan_value_counts ,
81- lower_bounds = entry .data_file .lower_bounds ,
82- upper_bounds = entry .data_file .upper_bounds ,
83- key_metadata = entry .data_file .key_metadata ,
84- split_offsets = entry .data_file .split_offsets ,
85- equality_ids = entry .data_file .equality_ids ,
86- sort_order_id = entry .data_file .sort_order_id ,
87- referenced_data_file = entry .data_file .referenced_data_file ,
88- )
89- entry_v2 = ManifestEntry .from_args (
90- _table_format_version = 2 ,
91- status = entry .status ,
92- snapshot_id = entry .snapshot_id ,
93- sequence_number = entry .sequence_number ,
94- file_sequence_number = entry .file_sequence_number ,
95- data_file = data_file_v2 ,
67+ data_file_v3_type = data_file_with_partition (
68+ partition_type = test_spec .partition_type (test_schema ),
69+ format_version = 3 ,
9670 )
9771 data_file_v2_type = data_file_with_partition (
9872 partition_type = test_spec .partition_type (test_schema ),
9973 format_version = 2 ,
10074 )
75+ entry_v3_type = manifest_entry_schema_with_data_file (format_version = 3 , data_file = data_file_v3_type ).as_struct ()
10176 entry_v2_type = manifest_entry_schema_with_data_file (format_version = 2 , data_file = data_file_v2_type ).as_struct ()
10277
10378 with TemporaryDirectory () as tmpdir :
@@ -119,4 +94,4 @@ def test_write_sample_manifest(table_test_all_types: Table, compression: AvroCom
11994 it = iter (r )
12095 fa_entry = next (it )
12196
122- assert fa_entry == record_to_fastavro (entry_v2 , entry_v2_type )
97+ assert fa_entry == record_to_fastavro (entry , record_struct = entry_v3_type , file_struct = entry_v2_type )
0 commit comments