cloud-fan commented on a change in pull request #27243: [SPARK-30535][SQL]
Migrate ALTER TABLE commands to the new framework
URL: https://github.com/apache/spark/pull/27243#discussion_r368365913
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -394,13 +395,14 @@ case class DropTable(
ifExists: Boolean) extends Command
/**
- * The logical plan of the ALTER TABLE command that works for v2 tables.
+ * The base class for ALTER TABLE commands that work for v2 tables.
*/
-case class AlterTable(
- catalog: TableCatalog,
- ident: Identifier,
- table: NamedRelation,
- changes: Seq[TableChange]) extends Command {
+abstract class AlterTable extends Command {
+ def table: LogicalPlan
+
+ def changes: Seq[TableChange]
+
+ override def children: Seq[LogicalPlan] = Seq(table)
override lazy val resolved: Boolean = table.resolved && {
changes.forall {
Review comment:
I think it's fine to remove it completely. This is duplicated with the logic
in `CheckAnalysis`.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]