Conversation
manuzhang
force-pushed
the
spark-4.2-view-rename-target-namespace
branch
from
September 27, 2026 14:18
95f29e4 to
3e63160
Compare
szehon-ho
reviewed
Oct 1, 2026
ExtendedDataSourceV2Strategy resolved the rename target with Spark3Util.catalogAndIdentifier before deciding whether the target was unqualified. For a single-part target name that helper fills in the current namespace, which can differ from the source view namespace, so the renamed view moved to the session namespace. Resolve single-part targets by leaving the namespace empty, which IcebergRenameV2ViewExec already fills in from the source view, and resolve multi-part targets relative to the source catalog so the existing cross-catalog move rejection still applies. This matches Spark's v2 RenameTableExec. Generated-by: Claude Code Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keep the comment to what an unqualified target means, and document in Spark3Util where a name without a namespace is placed. Generated-by: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated-by: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manuzhang
force-pushed
the
spark-4.2-view-rename-target-namespace
branch
from
October 2, 2026 01:56
06e59e7 to
fc8ef27
Compare
This branch has not been deployed
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.
Problem
Renaming a qualified view to an unqualified target moves the view into the session's current namespace instead of keeping it in the source view's namespace.
Root cause
ExtendedDataSourceV2Strategyresolves the rename target withSpark3Util.catalogAndIdentifierbefore deciding whether the target is actually unqualified. For a single-part target name that helper fills in the current namespace, so the identifier handed toIcebergRenameV2ViewExecalready carries the session namespace.IcebergRenameV2ViewExecdoes handle an unqualified target correctly — it fills the namespace in from the source view — but that branch is unreachable because the namespace is never empty by the time it runs.Changes
IcebergRenameV2ViewExecapply the source view's namespace. This matches Spark's v2RenameTableExec.Tests
The new test fails on
mainfor all three catalog configurations and passes with the fix.TestViewsruns 294 tests with no failures.AI Disclosure
🤖 Generated with Claude Code