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 2019/05/30 18:34:50 UTC

[GitHub] [spark] jzhuge commented on a change in pull request #24723: [SPARK-27857][SQL] Move ALTER TABLE parsing into Catalyst

jzhuge commented on a change in pull request #24723: [SPARK-27857][SQL] Move ALTER TABLE parsing into Catalyst
URL: https://github.com/apache/spark/pull/24723#discussion_r289117163
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
 ##########
 @@ -2195,4 +2195,143 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging
     }
   }
 
+  /**
+   * Parse new column info from ADD COLUMN into a NewColumn.
+   */
+  override def visitNewColumn(ctx: NewColumnContext): AnyRef = withOrigin(ctx) {
+    NewColumn(
+      ctx.name.identifier.asScala.map(_.getText),
 
 Review comment:
   Should we add a `parseQualifiedName` for this?  `ctx.<name>.identifier.asScala.map(_.getText)` for qualifiedName seems to be used in many places.

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