mihailoale-db commented on code in PR #53474:
URL: https://github.com/apache/spark/pull/53474#discussion_r2619721878


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/AutoGeneratedAliasProvider.scala:
##########
@@ -31,12 +31,22 @@ class AutoGeneratedAliasProvider(expressionIdAssigner: 
ExpressionIdAssigner) {
    * Create a new auto-generated [[Alias]]. If the `name` is not provided, 
[[toPrettySql]] is going
    * to be used to generate a proper alias name. We call 
[[ExpressionIdAssigner.mapExpression]] to
    * register this alias in the [[ExpressionIdAssigner]].
+   *
+   * If `plainAlias` is true, we create an [[Alias]] without mapping 
expression ID. This is needed
+   * for the [[Alias]]es created in fixed-point.
    */
   def newAlias(
       child: Expression,
       name: Option[String] = None,
-      explicitMetadata: Option[Metadata] = None): Alias = {
-    newAliasImpl(child = child, name = name, explicitMetadata = 
explicitMetadata)
+      explicitMetadata: Option[Metadata] = None,
+      plainAlias: Boolean = false): Alias = {
+    if (plainAlias) {
+      Alias(child = child, name = name.getOrElse(toPrettySQL(child)))(

Review Comment:
   makes sense, changed it.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to