Skip to content

Backport #1097 to v1.5-variegata: write delete manifests with content='deletes'#1100

Merged
Tishj merged 1 commit into
duckdb:v1.5-variegatafrom
raghav-reglobe:backport-delete-manifest-content-v1.5-variegata
Jun 22, 2026
Merged

Backport #1097 to v1.5-variegata: write delete manifests with content='deletes'#1100
Tishj merged 1 commit into
duckdb:v1.5-variegatafrom
raghav-reglobe:backport-delete-manifest-content-v1.5-variegata

Conversation

@raghav-reglobe

Copy link
Copy Markdown
Contributor

This backports #1097 (merged to main) onto the v1.5-variegata release branch.

Without it, a v3 DELETE on this branch writes its delete manifest's Avro content file metadata as data instead of deletes — it's hardcoded in WriteToFile. Readers that cross-check that key against the manifest-list entry's content type then reject the mismatch. The change just makes the metadata follow what the manifest actually holds (DATA -> "data", else "deletes").

Clean cherry-pick of #1097 with its test — figured the release branch could use it too. Happy to reshape if you'd prefer.

@Tishj
Tishj marked this pull request as draft June 22, 2026 18:23
@Tishj

Tishj commented Jun 22, 2026

Copy link
Copy Markdown
Member

Please remove the comment 👍

WriteToFile hardcoded the Avro file-metadata 'content' key to "data" for every
manifest, including delete manifests. The Iceberg spec requires this key to
reflect what the manifest holds ("data" or "deletes"); spec-strict readers
cross-check it against the manifest list entry's content type and reject a
delete manifest mislabeled as "data". Derive it from the manifest's content.

Adds a test asserting a v3 DELETE's delete manifest carries content='deletes'
(and not the mislabeled 'data') in its Avro file metadata.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Raghvendra Singh <raghav@cashify.in>
@raghav-reglobe
raghav-reglobe force-pushed the backport-delete-manifest-content-v1.5-variegata branch from 891840e to f343c51 Compare June 22, 2026 20:28
@raghav-reglobe

Copy link
Copy Markdown
Contributor Author

Done 👍

@raghav-reglobe
raghav-reglobe marked this pull request as ready for review June 22, 2026 20:31
@Tishj
Tishj merged commit 4e1d28b into duckdb:v1.5-variegata Jun 22, 2026
27 checks passed
@Tishj

Tishj commented Jun 22, 2026

Copy link
Copy Markdown
Member

Thanks!

SELECT
count(*) FILTER (WHERE position('0e636f6e74656e740e64656c65746573' IN lower(hex(content))) > 0) AS has_deletes,
count(*) FILTER (WHERE position('0e636f6e74656e740864617461' IN lower(hex(content))) > 0) AS has_data
FROM read_blob(getvariable('delete_manifest'));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does read_avro(getvariable('delete_manifest')) not work here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants