Skip to content

[iceberg] Keep tables loadable when the mirror cannot publish their schema - #10187

Open
plusplusjiajia wants to merge 5 commits into
apache:masterfrom
plusplusjiajia:gh-iceberg-load-legacy-mirror
Open

plusplusjiajia wants to merge 5 commits into
apache:masterfrom
plusplusjiajia:gh-iceberg-load-legacy-mirror

Conversation

@plusplusjiajia

@plusplusjiajia plusplusjiajia commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Purpose

The Iceberg publication rules in validateTableSchema also run when a table is loaded, so a table an older release let the mirror publish, such as one with a TIMESTAMP(9) column, cannot be loaded at all after upgrading: reads fail, and even the ALTER that turns the mirror off, which the error message itself recommends, fails because the catalog loads the table first. Loading now validates the table without its mirror option, so the table can be read and repaired, while persisting a schema, enabling the mirror, every commit and every retry still run the rules before anything is published. This does not repair Iceberg metadata an older release already wrote with such a type; turning the mirror off remains the way out. The rules came in with #9455 and #9467, which are already on release-2.1, so this should be cherry-picked there too.

Tests

IcebergCompatibilityTest#testExistingTableWithUnpublishableTimestampsStillLoads, #testRetryRefusesToRepublishWhatTheMirrorCannotPublish

@plusplusjiajia
plusplusjiajia marked this pull request as draft September 26, 2026 06:54
@plusplusjiajia
plusplusjiajia marked this pull request as ready for review September 27, 2026 01:13
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.

1 participant