-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34475][SQL] Rename logical nodes of v2 ALTER commands
#31596
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
| * }}} | ||
| */ | ||
| case class AlterTableAddPartition( | ||
| case class AddPartition( |
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.
Maybe AddPartitions because the command can add multiple partitions.
ALTER commands
imback82
left a comment
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.
LGTM except for pending comments including AddPartitions.
sql/core/src/test/scala/org/apache/spark/sql/execution/command/PlanResolutionSuite.scala
Outdated
Show resolved
Hide resolved
|
Kubernetes integration test starting |
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
Outdated
Show resolved
Hide resolved
| * The logical plan of the ALTER TABLE ... RENAME TO PARTITION command. | ||
| */ | ||
| case class AlterTableRenamePartition( | ||
| case class RenamePartition( |
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.
Even now, we allow to rename only one partition but Hive supports renaming of multiple partitions in one command. Maybe Spark will support this too in the future. Should we name it as RenamePartitions?
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.
yea, to be consistent with ADD and DROP
| * The logical plan of the ALTER TABLE ... SET LOCATION command. | ||
| */ | ||
| case class AlterTableSetLocation( | ||
| case class SetTableLocation( |
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.
The command incapsulates 2 commands actually: set table location and set partition location. Should we split it to SetTableLocation and SetPartitionLocation (separately in another PR).
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.
SGTM
|
Kubernetes integration test status failure |
|
Test build #135277 has finished for PR 31596 at commit
|
|
Test build #135312 has finished for PR 31596 at commit
|
|
cc @cloud-fan |
|
@HyukjinKwon @cloud-fan @dongjoon-hyun Can this be merged to |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
RC3 is cut and I don't think we should do this refactor in 3.1.2 (assuming RC3 passes). |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #135334 has finished for PR 31596 at commit
|
|
Test build #135339 has finished for PR 31596 at commit
|
@cloud-fan, hm are there any API change here? |
|
no, logical plan is not a public API. |
|
thanks, merging to master! |
What changes were proposed in this pull request?
In the PR, I propose to rename logical nodes of v2 commands in the form:
<verb> + <object>like:Why are the changes needed?
RenameTableforALTER TABLE .. RENAME TOwas added beforeAlterTableRenamePartition.Does this PR introduce any user-facing change?
Should not since this is non-public APIs.
How was this patch tested?
./dev/scalastyle