db-scnakandala commented on code in PR #39722:
URL: https://github.com/apache/spark/pull/39722#discussion_r1101002739
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala:
##########
@@ -632,7 +636,12 @@ case class Multiply(
override lazy val canonicalized: Expression = {
// TODO: do not reorder consecutive `Multiply`s with different `evalMode`
- orderCommutative({ case Multiply(l, r, _) => Seq(l, r)
}).reduce(Multiply(_, _, evalMode))
+ val reorderResult = buildCanonicalizedPlan(
+ { case Multiply(l, r, _) => Seq(l, r) }
+ { case (l: Expression, r: Expression) => Multiply(l, r, evalMode)},
+ Some(evalMode)
+ )
+ reorderResult
Review Comment:
done.
--
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]