@@ -2050,9 +2050,7 @@ def test_equality_delete_treats_uuid_nulls_as_equal(tmp_path: Path) -> None:
20502050 data_path = tmp_path / "data.parquet"
20512051 delete_path = tmp_path / "delete.parquet"
20522052 kept = uuid .UUID ("00000000-0000-0000-0000-000000000001" )
2053- pq .write_table (
2054- pa .table ({"id" : pa .array ([kept , None ], type = pa .uuid ())}, schema = schema_to_pyarrow (schema )), data_path
2055- )
2053+ pq .write_table (pa .table ({"id" : pa .array ([kept , None ], type = pa .uuid ())}, schema = schema_to_pyarrow (schema )), data_path )
20562054 pq .write_table (pa .table ({"id" : pa .array ([None ], type = pa .uuid ())}), delete_path )
20572055
20582056 result = _scan_equality_delete_files (schema , data_path , [delete_path ], [1 ])
@@ -2065,9 +2063,7 @@ def test_equality_delete_aligns_renamed_fields_by_id(tmp_path: Path) -> None:
20652063 data_path = tmp_path / "data.parquet"
20662064 current_delete_path = tmp_path / "current-delete.parquet"
20672065 renamed_delete_path = tmp_path / "renamed-delete.parquet"
2068- pq .write_table (
2069- pa .table ({"id" : pa .array ([1 , 2 , 3 ], type = pa .int32 ())}, schema = schema_to_pyarrow (current_schema )), data_path
2070- )
2066+ pq .write_table (pa .table ({"id" : pa .array ([1 , 2 , 3 ], type = pa .int32 ())}, schema = schema_to_pyarrow (current_schema )), data_path )
20712067 pq .write_table (
20722068 pa .table ({"id" : pa .array ([2 ], type = pa .int32 ())}, schema = schema_to_pyarrow (current_schema )),
20732069 current_delete_path ,
@@ -2077,9 +2073,7 @@ def test_equality_delete_aligns_renamed_fields_by_id(tmp_path: Path) -> None:
20772073 renamed_delete_path ,
20782074 )
20792075
2080- result = _scan_equality_delete_files (
2081- current_schema , data_path , [current_delete_path , renamed_delete_path ], [1 ]
2082- )
2076+ result = _scan_equality_delete_files (current_schema , data_path , [current_delete_path , renamed_delete_path ], [1 ])
20832077 assert result .column ("id" ).to_pylist () == [1 ]
20842078
20852079
@@ -2092,9 +2086,7 @@ def test_equality_delete_dropped_field_does_not_match_a_partial_key(tmp_path: Pa
20922086 )
20932087 data_path = tmp_path / "data.parquet"
20942088 delete_path = tmp_path / "delete.parquet"
2095- pq .write_table (
2096- pa .table ({"id" : pa .array ([1 ], type = pa .int32 ())}, schema = schema_to_pyarrow (current_schema )), data_path
2097- )
2089+ pq .write_table (pa .table ({"id" : pa .array ([1 ], type = pa .int32 ())}, schema = schema_to_pyarrow (current_schema )), data_path )
20982090 pq .write_table (
20992091 pa .table (
21002092 {"id" : pa .array ([1 ], type = pa .int32 ()), "dropped" : ["not-null" ]},
@@ -2111,9 +2103,7 @@ def test_orc_equality_delete(tmp_path: Path) -> None:
21112103 schema = Schema (NestedField (1 , "id" , IntegerType (), required = True ), schema_id = 1 )
21122104 data_path = tmp_path / "data.orc"
21132105 delete_path = tmp_path / "delete.orc"
2114- orc .write_table (
2115- pa .table ({"id" : pa .array ([1 , 2 , 3 ], type = pa .int32 ())}, schema = schema_to_pyarrow (schema )), data_path
2116- )
2106+ orc .write_table (pa .table ({"id" : pa .array ([1 , 2 , 3 ], type = pa .int32 ())}, schema = schema_to_pyarrow (schema )), data_path )
21172107 orc .write_table (pa .table ({"id" : pa .array ([2 ], type = pa .int32 ())}, schema = schema_to_pyarrow (schema )), delete_path )
21182108
21192109 result = _scan_equality_delete_files (schema , data_path , [delete_path ], [1 ], FileFormat .ORC )
@@ -2125,12 +2115,8 @@ def test_equality_delete_casts_promoted_key_types(tmp_path: Path) -> None:
21252115 old_schema = Schema (NestedField (1 , "id" , IntegerType (), required = True ), schema_id = 1 )
21262116 data_path = tmp_path / "data.parquet"
21272117 delete_path = tmp_path / "delete.parquet"
2128- pq .write_table (
2129- pa .table ({"id" : pa .array ([1 , 2 , 3 ], type = pa .int64 ())}, schema = schema_to_pyarrow (current_schema )), data_path
2130- )
2131- pq .write_table (
2132- pa .table ({"id" : pa .array ([2 ], type = pa .int32 ())}, schema = schema_to_pyarrow (old_schema )), delete_path
2133- )
2118+ pq .write_table (pa .table ({"id" : pa .array ([1 , 2 , 3 ], type = pa .int64 ())}, schema = schema_to_pyarrow (current_schema )), data_path )
2119+ pq .write_table (pa .table ({"id" : pa .array ([2 ], type = pa .int32 ())}, schema = schema_to_pyarrow (old_schema )), delete_path )
21342120
21352121 result = _scan_equality_delete_files (current_schema , data_path , [delete_path ], [1 ])
21362122 assert result .column ("id" ).to_pylist () == [1 , 3 ]
0 commit comments