Skip to content

Commit d7dd666

Browse files
committed
validate seq number
1 parent ba5ebc4 commit d7dd666

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/integration/test_writes/test_rewrite_manifests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ def test_rewrite_v1_v2_manifests(session_catalog: Catalog, arrow_table_with_null
108108
)
109109
assert tbl.format_version == 1, f"Expected v1, got: v{tbl.format_version}"
110110

111-
# tbl.append(arrow_table_with_null)
112111
# Upgrade to v2 and append more data
113112
with tbl.transaction() as tx:
114113
tx.upgrade_table_version(format_version=2)
@@ -117,7 +116,7 @@ def test_rewrite_v1_v2_manifests(session_catalog: Catalog, arrow_table_with_null
117116
assert tbl.format_version == 2, f"Expected v2, got: v{tbl.format_version}"
118117

119118
with tbl.transaction() as tx: # type: ignore[unreachable]
120-
tx.set_properties({"commit.manifest-merge.enabled": "true", "commit.manifest.min-count-to-merge": "2"})
119+
tx.set_properties({TableProperties.MANIFEST_MERGE_ENABLED: "true", TableProperties.MANIFEST_MIN_MERGE_COUNT: "2"})
121120

122121
# Get initial manifest state
123122
manifests = tbl.inspect.manifests()
@@ -141,6 +140,7 @@ def test_rewrite_v1_v2_manifests(session_catalog: Catalog, arrow_table_with_null
141140
assert new_manifests[0].existing_files_count == 2, "Should have 2 existing files in the new manifest"
142141
assert new_manifests[0].added_files_count == 0, "Should have no added files in the new manifest"
143142
assert new_manifests[0].deleted_files_count == 0, "Should have no deleted files in the new manifest"
143+
assert new_manifests[0].sequence_number is not None, "Should have a sequence number in the new manifest"
144144

145145
# Validate the data is intact
146146
expected_records_count = arrow_table_with_null.shape[0] * 2
@@ -172,7 +172,7 @@ def test_rewrite_small_manifests_non_partitioned_table(session_catalog: Catalog,
172172
tbl.append(arrow_table_with_null)
173173

174174
tbl.transaction().set_properties(
175-
{"commit.manifest-merge.enabled": "true", "commit.manifest.min-count-to-merge": "2"}
175+
{TableProperties.MANIFEST_MERGE_ENABLED: "true", TableProperties.MANIFEST_MIN_MERGE_COUNT: "2"}
176176
).commit_transaction()
177177
tbl = tbl.refresh()
178178
manifests = tbl.inspect.manifests()
@@ -251,8 +251,8 @@ def test_rewrite_small_manifests_partitioned_table(session_catalog: Catalog) ->
251251
.set_properties(
252252
{
253253
TableProperties.MANIFEST_TARGET_SIZE_BYTES: str(target_manifest_size_bytes),
254-
"commit.manifest-merge.enabled": "true",
255-
"commit.manifest.min-count-to-merge": "2",
254+
TableProperties.MANIFEST_MERGE_ENABLED: "true",
255+
TableProperties.MANIFEST_MIN_MERGE_COUNT: "2",
256256
}
257257
)
258258
.commit_transaction()

0 commit comments

Comments
 (0)