Skip to content

Commit 33aaef0

Browse files
committed
test: Update test_replace_passes_through_delete_manifests to account for how fast_append() still labels data as ManifestContent.DATA rather than ManifestContent.DELETES
1 parent 596df80 commit 33aaef0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/table/test_replace.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
DataFile,
2424
DataFileContent,
2525
FileFormat,
26-
ManifestContent,
2726
ManifestEntry,
2827
ManifestEntryStatus,
2928
)
@@ -385,6 +384,7 @@ def test_replace_passes_through_delete_manifests(catalog: Catalog) -> None:
385384
table = catalog.create_table(
386385
identifier="default.test_replace_delete_manifests",
387386
schema=Schema(),
387+
properties={"format-version": "2"},
388388
)
389389

390390
# 1. Data file we will replace
@@ -436,8 +436,10 @@ def test_replace_passes_through_delete_manifests(catalog: Catalog) -> None:
436436

437437
delete_manifest_path = None
438438
for m in manifests_before:
439-
if m.content == ManifestContent.DELETES:
439+
entries = m.fetch_manifest_entry(table.io, discard_deleted=False)
440+
if any(e.data_file.file_path == file_a_deletes.file_path for e in entries):
440441
delete_manifest_path = m.manifest_path
442+
break
441443

442444
assert delete_manifest_path is not None
443445

0 commit comments

Comments
 (0)