HyukjinKwon commented on a change in pull request #30459:
URL: https://github.com/apache/spark/pull/30459#discussion_r528437121



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SubExprEvaluationRuntime.scala
##########
@@ -98,7 +96,7 @@ class SubExprEvaluationRuntime(cacheMaxEntries: Int) {
       val proxy = ExpressionProxy(expr, proxyExpressionCurrentId, this)
       proxyExpressionCurrentId += 1
 
-      proxyMap.putAll(e.map(_ -> proxy).toMap.asJava)
+      e.map(proxyMap.put(_, proxy))

Review comment:
       Actually, @viirya. Mind adding some comments that show some examples of 
the expected seqs and maps here or in the method docs? a rough example like 
`commonExprs ->  Seq(Seq(common expr 1, ... common expr n), ...)` and `proxyMap 
-> Map(common expr 1 -> proxy(common expr 1), common expr n -> proxy(common 
expr 1)`. I think it's easy to make a mistake here.




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



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

Reply via email to