imback82 commented on a change in pull request #29339:
URL: https://github.com/apache/spark/pull/29339#discussion_r495668982



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -551,3 +552,31 @@ case class ShowFunctions(
     pattern: Option[String]) extends Command {
   override def children: Seq[LogicalPlan] = child.toSeq
 }
+
+/**
+ * The logical plan of the ALTER TABLE ADD PARTITION command that works for v2 
tables.
+ *
+ * The syntax of this command is:
+ * {{{
+ *     ALTER TABLE table ADD [IF NOT EXISTS]
+ *                 PARTITION spec1 [LOCATION 'loc1'][, PARTITION spec2 
[LOCATION 'loc2'], ...];
+ * }}}
+ */
+case class AlterTableAddPartition(
+    table: SupportsPartitionManagement,

Review comment:
       You should make this `LogicalPlan` and create 
`AlterTableAddPartition(UnresolvedTableOrView, ...)` in `AstBuilder.scala`, and 
you can remove`*Statement` classes.
   
   Then you can move the logics in `ResolveCatalog` to `DataSourceV2Strategy` 
using this class.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to