@@ -1649,7 +1649,8 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
16491649 assert tbl_a_entries ["file_sequence_number" ] == [3 , 2 , 1 ] if format_version == 2 else [0 , 0 , 0 ]
16501650 for i in range (3 ):
16511651 tbl_a_data_file = tbl_a_entries ["data_file" ][i ]
1652- assert tbl_a_data_file ["column_sizes" ] == [
1652+ # Use set comparison since pyiceberg_core may return items in different order
1653+ assert set (tbl_a_data_file ["column_sizes" ]) == {
16531654 (1 , 51 ),
16541655 (2 , 80 ),
16551656 (3 , 130 ),
@@ -1662,7 +1663,7 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
16621663 (10 , 96 ),
16631664 (11 , 80 ),
16641665 (12 , 111 ),
1665- ]
1666+ }
16661667 assert tbl_a_data_file ["content" ] == 0
16671668 assert tbl_a_data_file ["equality_ids" ] is None
16681669 assert tbl_a_data_file ["file_format" ] == "PARQUET"
@@ -1671,7 +1672,8 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
16711672 # verify that the snapshot id recorded should be the one where the file was added
16721673 assert tbl_a_entries ["snapshot_id" ][i ] == first_snapshot_id
16731674 assert tbl_a_data_file ["key_metadata" ] is None
1674- assert tbl_a_data_file ["lower_bounds" ] == [
1675+ # Use set comparison since pyiceberg_core may return items in different order
1676+ assert set (tbl_a_data_file ["lower_bounds" ]) == {
16751677 (1 , b"\x00 " ),
16761678 (2 , b"a" ),
16771679 (3 , b"aaaaaaaaaaaaaaaa" ),
@@ -1684,9 +1686,10 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
16841686 (10 , b"\x9e K\x00 \x00 " ),
16851687 (11 , b"\x01 " ),
16861688 (12 , b"\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 " ),
1687- ]
1689+ }
16881690 assert tbl_a_data_file ["nan_value_counts" ] == []
1689- assert tbl_a_data_file ["null_value_counts" ] == [
1691+ # Use set comparison since pyiceberg_core may return items in different order
1692+ assert set (tbl_a_data_file ["null_value_counts" ]) == {
16901693 (1 , 1 ),
16911694 (2 , 1 ),
16921695 (3 , 1 ),
@@ -1699,12 +1702,13 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
16991702 (10 , 1 ),
17001703 (11 , 1 ),
17011704 (12 , 1 ),
1702- ]
1705+ }
17031706 assert tbl_a_data_file ["partition" ] == {}
17041707 assert tbl_a_data_file ["record_count" ] == 3
17051708 assert tbl_a_data_file ["sort_order_id" ] is None
17061709 assert tbl_a_data_file ["split_offsets" ] == [4 ]
1707- assert tbl_a_data_file ["upper_bounds" ] == [
1710+ # Use set comparison since pyiceberg_core may return items in different order
1711+ assert set (tbl_a_data_file ["upper_bounds" ]) == {
17081712 (1 , b"\x01 " ),
17091713 (2 , b"z" ),
17101714 (3 , b"zzzzzzzzzzzzzzz{" ),
@@ -1717,8 +1721,9 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
17171721 (10 , b"\xd9 K\x00 \x00 " ),
17181722 (11 , b"\x12 " ),
17191723 (12 , b"\x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 \x11 " ),
1720- ]
1721- assert tbl_a_data_file ["value_counts" ] == [
1724+ }
1725+ # Use set comparison since pyiceberg_core may return items in different order
1726+ assert set (tbl_a_data_file ["value_counts" ]) == {
17221727 (1 , 3 ),
17231728 (2 , 3 ),
17241729 (3 , 3 ),
@@ -1731,7 +1736,7 @@ def test_merge_manifests_file_content(session_catalog: Catalog, arrow_table_with
17311736 (10 , 3 ),
17321737 (11 , 3 ),
17331738 (12 , 3 ),
1734- ]
1739+ }
17351740
17361741
17371742@pytest .mark .integration
0 commit comments