This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new cad469d [SPARK-34465][SQL] Rename v2 alter table exec nodes cad469d is described below commit cad469d47a0828106dcd2f9a949c91d69b28ec85 Author: Max Gekk <max.g...@gmail.com> AuthorDate: Thu Feb 18 14:33:26 2021 -0800 [SPARK-34465][SQL] Rename v2 alter table exec nodes ### What changes were proposed in this pull request? Rename the following v2 exec nodes: - AlterTableAddPartitionExec -> AddPartitionExec - AlterTableRenamePartitionExec -> RenamePartitionExec - AlterTableDropPartitionExec -> DropPartitionExec ### Why are the changes needed? - To be consistent with v2 exec node added before: ALTER TABLE .. RENAME TO` -> RenameTableExec. - For simplicity and readability of the execution plans. ### Does this PR introduce _any_ user-facing change? Should not since this is internal API. ### How was this patch tested? By running the existing test suites: ``` $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableAddPartitionSuite" $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableDropPartitionSuite" $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *AlterTableRenamePartitionSuite" ``` Closes #31584 from MaxGekk/rename-alter-table-exec-nodes. Authored-by: Max Gekk <max.g...@gmail.com> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- .../v2/{AlterTableAddPartitionExec.scala => AddPartitionExec.scala} | 2 +- .../spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala | 6 +++--- .../{AlterTableDropPartitionExec.scala => DropPartitionExec.scala} | 2 +- ...lterTableRenamePartitionExec.scala => RenamePartitionExec.scala} | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableAddPartitionExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AddPartitionExec.scala similarity index 98% rename from sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableAddPartitionExec.scala rename to sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AddPartitionExec.scala index 5772a2b..57d74ab 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableAddPartitionExec.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AddPartitionExec.scala @@ -27,7 +27,7 @@ import org.apache.spark.sql.connector.catalog.{SupportsAtomicPartitionManagement /** * Physical plan node for adding partitions of table. */ -case class AlterTableAddPartitionExec( +case class AddPartitionExec( table: SupportsPartitionManagement, partSpecs: Seq[ResolvedPartitionSpec], ignoreIfExists: Boolean, diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala index 782e6b7..976c7df8 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala @@ -354,7 +354,7 @@ class DataSourceV2Strategy(session: SparkSession) extends Strategy with Predicat case AlterTableAddPartition( r @ ResolvedTable(_, _, table: SupportsPartitionManagement, _), parts, ignoreIfExists) => - AlterTableAddPartitionExec( + AddPartitionExec( table, parts.asResolvedPartitionSpecs, ignoreIfExists, @@ -365,7 +365,7 @@ class DataSourceV2Strategy(session: SparkSession) extends Strategy with Predicat parts, ignoreIfNotExists, purge) => - AlterTableDropPartitionExec( + DropPartitionExec( table, parts.asResolvedPartitionSpecs, ignoreIfNotExists, @@ -374,7 +374,7 @@ class DataSourceV2Strategy(session: SparkSession) extends Strategy with Predicat case AlterTableRenamePartition( r @ ResolvedTable(_, _, table: SupportsPartitionManagement, _), from, to) => - AlterTableRenamePartitionExec( + RenamePartitionExec( table, Seq(from).asResolvedPartitionSpecs.head, Seq(to).asResolvedPartitionSpecs.head, diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableDropPartitionExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DropPartitionExec.scala similarity index 98% rename from sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableDropPartitionExec.scala rename to sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DropPartitionExec.scala index f3137ab..50e1448 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableDropPartitionExec.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DropPartitionExec.scala @@ -25,7 +25,7 @@ import org.apache.spark.sql.connector.catalog.{SupportsAtomicPartitionManagement /** * Physical plan node for dropping partitions of table. */ -case class AlterTableDropPartitionExec( +case class DropPartitionExec( table: SupportsPartitionManagement, partSpecs: Seq[ResolvedPartitionSpec], ignoreIfNotExists: Boolean, diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableRenamePartitionExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/RenamePartitionExec.scala similarity index 97% rename from sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableRenamePartitionExec.scala rename to sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/RenamePartitionExec.scala index 0632bd7..20b2dd1 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/AlterTableRenamePartitionExec.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/RenamePartitionExec.scala @@ -25,7 +25,7 @@ import org.apache.spark.sql.connector.catalog.SupportsPartitionManagement /** * Physical plan node for renaming a table partition. */ -case class AlterTableRenamePartitionExec( +case class RenamePartitionExec( table: SupportsPartitionManagement, from: ResolvedPartitionSpec, to: ResolvedPartitionSpec, --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org