dongjoon-hyun commented on a change in pull request #24842: [SPARK-28002][SQL] 
Support WITH clause column aliases
URL: https://github.com/apache/spark/pull/24842#discussion_r293025392
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
 ##########
 @@ -161,9 +161,14 @@ class AstBuilder(conf: SQLConf) extends 
SqlBaseBaseVisitor[AnyRef] with Logging
    *
    * This is only used for Common Table Expressions.
    */
-  override def visitNamedQuery(ctx: NamedQueryContext): SubqueryAlias = 
withOrigin(ctx) {
-    SubqueryAlias(ctx.name.getText, plan(ctx.query))
-  }
+  override def visitNamedQuery(ctx: NamedQueryContext): SubqueryAlias =
+    withOrigin(ctx) {
 
 Review comment:
   nit. Shall we keep the original form like the following? That reduces both 
the diff of patch and the depth of indentation of the function body.
   ```scala
   override def visitNamedQuery(ctx: NamedQueryContext): SubqueryAlias = 
withOrigin(ctx) {
   ```

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

Reply via email to