cloud-fan commented on code in PR #37851:
URL: https://github.com/apache/spark/pull/37851#discussion_r969165367
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Canonicalize.scala:
##########
@@ -28,43 +28,12 @@ object Canonicalize {
e: Expression,
f: PartialFunction[Expression, Seq[Expression]]): Seq[Expression] = e
match {
case c if f.isDefinedAt(c) => f(c).flatMap(gatherCommutative(_, f))
- case other => reorderCommutativeOperators(other) :: Nil
+ case other => other.canonicalized :: Nil
Review Comment:
I think this is the key change. This means that we will first reorder
leaf-most adjacent commutative operators, and then do this recursively
bottom-up.
--
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]