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