cloud-fan commented on code in PR #50839:
URL: https://github.com/apache/spark/pull/50839#discussion_r2081734322


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2AlterTableCommands.scala:
##########
@@ -309,6 +316,27 @@ case class AddConstraint(
   protected def withNewChildInternal(newChild: LogicalPlan): LogicalPlan = 
copy(table = newChild)
 }
 
+/**
+ * The logical plan of the ALTER TABLE ... ADD CONSTRAINT command for Check 
constraints.
+ */
+case class AddCheckConstraint(
+    override val table: LogicalPlan,

Review Comment:
   The current code is fragile as we have code like the following
   ```
         case a: AlterTableCommand if a.table.resolved && 
hasUnresolvedFieldName(a) =>
           val table = a.table.asInstanceOf[ResolvedTable]
   ```



-- 
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.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to