cloud-fan commented on a change in pull request #32735:
URL: https://github.com/apache/spark/pull/32735#discussion_r644435496



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala
##########
@@ -192,6 +192,23 @@ trait HigherOrderFunction extends Expression with 
ExpectsInputTypes {
           argumentMap(variable.exprId)
       }
   }
+
+  override lazy val canonicalized: Expression = {
+    var currExprId = -1
+    val argumentMap = functions.flatMap(_.collect {
+      case l: NamedLambdaVariable =>
+        currExprId += 1
+        l.name -> currExprId

Review comment:
       Are you sure the name is unique? It looks safer to use `l.exprId` as the 
key.




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

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

Reply via email to