-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-35403][SQL] Migrate ALTER TABLE commands that alter columns to use UnresolvedTable to resolve the identifier #32542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #138533 has finished for PR 32542 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
@cloud-fan this is a PR to attempt to migrate the remaining |
Kubernetes integration test starting |
Kubernetes integration test status failure |
case add: AddColumn => | ||
CatalogV2Util.failNullType(add.dataType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is moved from ResolveSessionCatalog.scala
.
Test build #138542 has finished for PR 32542 at commit
|
Test build #138549 has finished for PR 32542 at commit
|
I think there are 2 options we can pick:
@imback82 what do you think? I feel option 1 is a smaller change. |
Do you mean generating
I can try this approach and create a separate PR for comparison. Let me know if I misunderstood 1) option above. |
I see, then option 1 is not valid. Can you open a new PR to try option 2? |
Closing in favor of #32542 |
What changes were proposed in this pull request?
This PR proposes to migrate the following
ALTER TABLE
commands that alter columns to useUnresolvedTable
as achild
to resolve the table identifier:ALTER TABLE ... ADD COLUMNS
ALTER TABLE ... REPLACE COLUMNS
ALTER TABLE ... ALTER COLUMN
ALTER TABLE ... RENAME COLUMN
ALTER TABLE ... DROP COLUMNS
This allows consistent resolution rules (temp view first, etc.) to be applied for both v1/v2 commands. More info about the consistent resolution rule proposal can be found in JIRA or proposal doc.
Why are the changes needed?
This is a part of effort to make the relation lookup behavior consistent: SPARK-29900.
Does this PR introduce any user-facing change?
After this PR, the above
ALTER TABLE
commands will have a consistent resolution behavior.How was this patch tested?
Updated existing tests.