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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]