cloud-fan commented on code in PR #52061:
URL: https://github.com/apache/spark/pull/52061#discussion_r2282712513
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/PullOutNondeterministic.scala:
##########
@@ -42,7 +42,7 @@ object PullOutNondeterministic extends Rule[LogicalPlan] {
NondeterministicExpressionCollection.getNondeterministicToAttributes(a.groupingExpressions)
val newChild = Project(a.child.output ++
nondeterToAttr.values.asScala.toSeq, a.child)
val deterministicAggregate = a.transformExpressions { case e =>
- Option(nondeterToAttr.get(e)).map(_.toAttribute).getOrElse(e)
+
Option(nondeterToAttr.get(e.canonicalized)).map(_.toAttribute).getOrElse(e)
Review Comment:
This looks risky to me. We should not deduplicate nondeterministic
expressions, as they might have side effects.
--
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]