@@ -227,33 +227,20 @@ def test_partitioned_table_positional_deletes_sequence_number(spark: SparkSessio
227
227
# One positional delete has been added, but an OVERWRITE status is set
228
228
# https://github.com/apache/iceberg/issues/10122
229
229
snapshots = tbl .snapshots ()
230
- assert len (snapshots ) == 4
230
+ assert len (snapshots ) == 3
231
231
232
232
# Snapshots produced by Spark
233
233
assert [snapshot .summary .operation .value for snapshot in tbl .snapshots ()[0 :2 ]] == ['append' , 'overwrite' ]
234
234
235
- # Snapshots produced by PyIceberg
236
- # This is a no-op since nothing has been added or deleted (because the predicate cannot drop a whole file)
237
- assert tbl .snapshots ()[2 ].summary == Summary (
238
- Operation .DELETE ,
239
- ** {
240
- 'total-data-files' : '2' ,
241
- 'total-delete-files' : '1' ,
242
- 'total-records' : '5' ,
243
- 'total-files-size' : tbl .snapshots ()[2 ].summary ['total-files-size' ],
244
- 'total-position-deletes' : '1' ,
245
- 'total-equality-deletes' : '0' ,
246
- },
247
- )
248
235
# Will rewrite one parquet file
249
- assert tbl . snapshots ()[ 3 ].summary == Summary (
236
+ assert snapshots [ 2 ].summary == Summary (
250
237
Operation .OVERWRITE ,
251
238
** {
252
239
'added-files-size' : '1145' ,
253
240
'added-data-files' : '1' ,
254
241
'added-records' : '2' ,
255
242
'changed-partition-count' : '1' ,
256
- 'total-files-size' : tbl . snapshots ()[ 3 ].summary ['total-files-size' ],
243
+ 'total-files-size' : snapshots [ 2 ].summary ['total-files-size' ],
257
244
'total-delete-files' : '0' ,
258
245
'total-data-files' : '1' ,
259
246
'total-position-deletes' : '0' ,
@@ -262,7 +249,7 @@ def test_partitioned_table_positional_deletes_sequence_number(spark: SparkSessio
262
249
'deleted-data-files' : '2' ,
263
250
'removed-delete-files' : '1' ,
264
251
'deleted-records' : '5' ,
265
- 'removed-files-size' : '3088' ,
252
+ 'removed-files-size' : snapshots [ 2 ]. summary [ 'removed-files-size' ] ,
266
253
'removed-position-deletes' : '1' ,
267
254
},
268
255
)
0 commit comments