You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/02/28 03:39:45 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #40126: [SPARK-40822][SQL] Stable derived column aliases

cloud-fan commented on code in PR #40126:
URL: https://github.com/apache/spark/pull/40126#discussion_r1119542887


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -490,15 +494,17 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor
             case c @ Cast(ne: NamedExpression, _, _, _) => Alias(c, ne.name)()
             case e: ExtractValue =>
               if (extractOnly(e)) {
-                Alias(e, toPrettySQL(e))()
+                Alias(e, getAlias(e, optGenAliasFunc))()

Review Comment:
   can we check where we use `metaForAutoGeneratedAlias` and see if we should add it here as well?



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org