cloud-fan commented on code in PR #37851:
URL: https://github.com/apache/spark/pull/37851#discussion_r969168672


##########
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:
   It's probably better to have a new trait `CommutativeExpression` and remove 
this object.



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

Reply via email to