You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/11/09 01:54:35 UTC

Re: [PR] [SPARK-45832][SQL] Fix `Super method + is deprecated.` [spark]

panbingkun commented on code in PR #43713:
URL: https://github.com/apache/spark/pull/43713#discussion_r1387391412


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveLateralColumnAliasReference.scala:
##########
@@ -170,7 +170,8 @@ object ResolveLateralColumnAliasReference extends Rule[LogicalPlan] {
           case (a: Alias, idx) =>
             val lcaResolved = unwrapLCAReference(a)
             // Insert the original alias instead of rewritten one to detect chained LCA
-            aliasMap += (a.toAttribute -> AliasEntry(a, idx))
+            aliasMap =
+              AttributeMap(aliasMap.baseMap.values.toMap + (a.toAttribute -> AliasEntry(a, idx)))

Review Comment:
   ```suggestion
                 aliasMap ++= AttributeMap(Map(a.toAttribute -> AliasEntry(a, idx)))
   ```



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