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_r293222471
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala ########## @@ -81,18 +81,31 @@ class PlanParserSuite extends AnalysisTest { assertEqual("select * from a intersect all select * from b", a.intersect(b, isAll = true)) } + private def cte(plan: LogicalPlan, namedPlans: (String, (LogicalPlan, Seq[String]))*): With = { + val ctes = namedPlans.map { + case (name, (cte, columnAliases)) => + val subquery = if (columnAliases.isEmpty) { + cte + } else { + UnresolvedSubqueryColumnAliases(columnAliases, cte) + } + name -> SubqueryAlias(name, subquery) + } + With(plan, ctes) + } Review comment: This test suite is updated a few minute ago. Could you rebase once more? There will be another `cte` function in this test suite. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org