cloud-fan commented on a change in pull request #32832: URL: https://github.com/apache/spark/pull/32832#discussion_r659948827
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ########## @@ -424,6 +424,12 @@ class Analyzer(override val catalogManager: CatalogManager) */ object ResolveAliases extends Rule[LogicalPlan] { private def assignAliases(exprs: Seq[NamedExpression]) = { + def extractOnly(e: Expression): Boolean = e match { + case _: ExtractValue => e.children.forall(extractOnly) + case _: Literal => true Review comment: since we allow literal here, maybe we should allow it in the non `ExtractValue` case as well ########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala ########## @@ -424,6 +424,12 @@ class Analyzer(override val catalogManager: CatalogManager) */ object ResolveAliases extends Rule[LogicalPlan] { private def assignAliases(exprs: Seq[NamedExpression]) = { + def extractOnly(e: Expression): Boolean = e match { + case _: ExtractValue => e.children.forall(extractOnly) + case _: Literal => true Review comment: or maybe we shouldn't allow literal here either -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org