-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
revert [SPARK-29680][SQL] Remove ALTER TABLE CHANGE COLUMN syntax #27076
Conversation
Test build #116036 has finished for PR 27076 at commit
|
@@ -161,6 +161,9 @@ statement | |||
| ALTER TABLE table=multipartIdentifier | |||
(ALTER | CHANGE) COLUMN? column=multipartIdentifier | |||
(TYPE dataType)? (COMMENT comment=STRING)? colPosition? #alterTableColumn | |||
| ALTER TABLE table=multipartIdentifier partitionSpec? | |||
CHANGE COLUMN? | |||
colName=multipartIdentifier colType colPosition? #hiveChangeColumn |
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.
colName
was errorCapturingIdentifier
before. We want it to be multipartIdentifier
?
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.
Though it is fine because ResolveSessionCatalog
will detect and throw AnalysisException("ALTER COLUMN with qualified column is only supported with v2 tables.")
.
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 to be consistent with the other ALTER COLUMN syntax.
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.
I see. So this is for hive compatibility, looks good to me.
thanks for review, merging to master! |
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.
late +1
What changes were proposed in this pull request?
Revert #26338 , as the syntax is actually the hive style ALTER COLUMN.
This PR brings it back, and make it support multi-catalog:
AlterTableAlterColumnStatement
can't do renaming.Why are the changes needed?
to not break hive compatibility.
Does this PR introduce any user-facing change?
no, as the removal was merged in 3.0.
How was this patch tested?
new parser tests