You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/17 06:29:15 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27584: [SPARK-30814][SQL] ALTER TABLE ... ADD COLUMN position should be able to reference columns being added

cloud-fan commented on a change in pull request #27584: [SPARK-30814][SQL] ALTER TABLE ... ADD COLUMN position should be able to reference columns being added 
URL: https://github.com/apache/spark/pull/27584#discussion_r380003308
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -3023,9 +3023,27 @@ class Analyzer(
   object ResolveAlterTableChanges extends Rule[LogicalPlan] {
     def apply(plan: LogicalPlan): LogicalPlan = plan.resolveOperatorsUp {
       case a @ AlterTable(_, _, t: NamedRelation, changes) if t.resolved =>
+        // Keeps track of new columns being added. Keys are normalized parent names and
+        // values are field names that belong to their parent.
 
 Review comment:
   Can we be more clear here? For example, if we add a column `a.b.c.d`, which part should be the key? `a.b.c` or `a.b`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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