[ADH-8380] Iceberg table rename PoC: implement metadata file rename#22
Open
tigrulya-exe wants to merge 7 commits into
Open
[ADH-8380] Iceberg table rename PoC: implement metadata file rename#22tigrulya-exe wants to merge 7 commits into
tigrulya-exe wants to merge 7 commits into
Conversation
…to ensure proper credentials usage.
iamlapa
reviewed
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
rename.metadata.location.update(false by default), currently supported only by HMS catalog. When true, HiveCatalog also re-points the Iceberg metadata location to the new name's default warehouse path so that post-rename writes land under the new prefix.alter_tableRPC.drop.base-directory.enabledoption now always runs the per-file purge first (behavior ofdrop.base-directory.enabledset to false), and only then attempts to delete the base table directory. The directory is removed only when nothing remains under the prefix, otherwise the directory is preserved. It allows a table withrename.metadata.location.updateset to true survive scenarios, when another table, sitting in the previous location of the original table, is purged.rename, then re-create old name, then drop the new old-name with PURGEscenario.location, it does not physically move data files. Anything written before the rename keeps absolute paths under the old src directory and depends on that directory continuing to exist.LOCATIONfall back to current plain rename behavior.Limitations
rm -rf, purging of another non-Iceberg Hive table sitting in the old directory, or any directory deletion that does not go through the Iceberg catalog has no protection and can cause errors, because relocated metadata file still points to the old directory.RENAME_UPDATE_METADATA_LOCATIONis Hive-catalog only. The flag is opt-in and implemented forHiveCatalog. Other catalogs (REST, JDBC, Glue, Nessie) are not touched in this PR.write.data.path,write.metadata.path,write.location-provider.impl,write.object-storage.path,write.folder-storage.path)