-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[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
Changes from 15 commits
4388358
b4b6c15
91b738f
2a50be1
f26ac6f
c3938a6
19dbddd
1280b32
905f873
f7b6ce2
d314b60
5109748
2a721ad
8270b6e
6da1d08
09e7268
f6ab9ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -305,7 +305,7 @@ case class DescribeNamespace( | |
| * The logical plan of the ALTER (DATABASE|SCHEMA|NAMESPACE) ... SET (DBPROPERTIES|PROPERTIES) | ||
| * command. | ||
| */ | ||
| case class AlterNamespaceSetProperties( | ||
| case class SetNamespaceProperties( | ||
| namespace: LogicalPlan, | ||
| properties: Map[String, String]) extends Command { | ||
| override def children: Seq[LogicalPlan] = Seq(namespace) | ||
|
|
@@ -314,7 +314,7 @@ case class AlterNamespaceSetProperties( | |
| /** | ||
| * The logical plan of the ALTER (DATABASE|SCHEMA|NAMESPACE) ... SET LOCATION command. | ||
| */ | ||
| case class AlterNamespaceSetLocation( | ||
| case class SetNamespaceLocation( | ||
| namespace: LogicalPlan, | ||
| location: String) extends Command { | ||
| override def children: Seq[LogicalPlan] = Seq(namespace) | ||
|
|
@@ -676,7 +676,7 @@ case class AnalyzeColumn( | |
| * PARTITION spec1 [LOCATION 'loc1'][, PARTITION spec2 [LOCATION 'loc2'], ...]; | ||
| * }}} | ||
| */ | ||
| case class AlterTableAddPartition( | ||
| case class AddPartitions( | ||
| child: LogicalPlan, | ||
| parts: Seq[PartitionSpec], | ||
| ifNotExists: Boolean) extends Command { | ||
|
|
@@ -698,7 +698,7 @@ case class AlterTableAddPartition( | |
| * ALTER TABLE table DROP [IF EXISTS] PARTITION spec1[, PARTITION spec2, ...] [PURGE]; | ||
| * }}} | ||
| */ | ||
| case class AlterTableDropPartition( | ||
| case class DropPartitions( | ||
| child: LogicalPlan, | ||
| parts: Seq[PartitionSpec], | ||
| ifExists: Boolean, | ||
|
|
@@ -712,7 +712,7 @@ case class AlterTableDropPartition( | |
| /** | ||
| * The logical plan of the ALTER TABLE ... RENAME TO PARTITION command. | ||
| */ | ||
| case class AlterTableRenamePartition( | ||
| case class RenamePartition( | ||
| child: LogicalPlan, | ||
| from: PartitionSpec, | ||
| to: PartitionSpec) extends Command { | ||
|
|
@@ -727,7 +727,7 @@ case class AlterTableRenamePartition( | |
| /** | ||
| * The logical plan of the ALTER TABLE ... RECOVER PARTITIONS command. | ||
| */ | ||
| case class AlterTableRecoverPartitions(child: LogicalPlan) extends Command { | ||
| case class RecoverPartitions(child: LogicalPlan) extends Command { | ||
| override def children: Seq[LogicalPlan] = child :: Nil | ||
| } | ||
|
|
||
|
|
@@ -819,7 +819,7 @@ case class AlterViewAs( | |
| /** | ||
| * The logical plan of the ALTER VIEW ... SET TBLPROPERTIES command. | ||
| */ | ||
| case class AlterViewSetProperties( | ||
| case class SetViewProperties( | ||
| child: LogicalPlan, | ||
| properties: Map[String, String]) extends Command { | ||
| override def children: Seq[LogicalPlan] = child :: Nil | ||
|
|
@@ -828,7 +828,7 @@ case class AlterViewSetProperties( | |
| /** | ||
| * The logical plan of the ALTER VIEW ... UNSET TBLPROPERTIES command. | ||
| */ | ||
| case class AlterViewUnsetProperties( | ||
| case class UnsetViewProperties( | ||
| child: LogicalPlan, | ||
| propertyKeys: Seq[String], | ||
| ifExists: Boolean) extends Command { | ||
|
|
@@ -838,7 +838,7 @@ case class AlterViewUnsetProperties( | |
| /** | ||
| * The logical plan of the ALTER TABLE ... SET [SERDE|SERDEPROPERTIES] command. | ||
| */ | ||
| case class AlterTableSerDeProperties( | ||
| case class SetTableSerDeProperties( | ||
| child: LogicalPlan, | ||
| serdeClassName: Option[String], | ||
| serdeProperties: Option[Map[String, String]], | ||
|
|
@@ -876,7 +876,7 @@ case class UncacheTable( | |
| /** | ||
| * The logical plan of the ALTER TABLE ... SET LOCATION command. | ||
| */ | ||
| case class AlterTableSetLocation( | ||
| case class SetTableLocation( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SGTM |
||
| table: LogicalPlan, | ||
| partitionSpec: Option[TablePartitionSpec], | ||
| location: String) extends Command { | ||
|
|
@@ -886,7 +886,7 @@ case class AlterTableSetLocation( | |
| /** | ||
| * The logical plan of the ALTER TABLE ... SET TBLPROPERTIES command. | ||
| */ | ||
| case class AlterTableSetProperties( | ||
| case class SetTableProperties( | ||
| table: LogicalPlan, | ||
| properties: Map[String, String]) extends Command { | ||
| override def children: Seq[LogicalPlan] = table :: Nil | ||
|
|
@@ -895,7 +895,7 @@ case class AlterTableSetProperties( | |
| /** | ||
| * The logical plan of the ALTER TABLE ... UNSET TBLPROPERTIES command. | ||
| */ | ||
| case class AlterTableUnsetProperties( | ||
| case class UnsetTableProperties( | ||
| table: LogicalPlan, | ||
| propertyKeys: Seq[String], | ||
| ifExists: Boolean) extends Command { | ||
|
|
||
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