stevomitric commented on code in PR #58724:
URL: https://github.com/apache/spark/pull/58724#discussion_r4007459997
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/EquivalentExpressions.scala:
##########
@@ -263,11 +261,19 @@ case class ExpressionEquals(e: Expression) {
def height: Int = e.height
override def equals(o: Any): Boolean = o match {
- case other: ExpressionEquals => e.semanticEquals(other.e) && height ==
other.height
+ // Check the cheap `height` before the recursive `semanticEquals` (which
implies equal height).
Review Comment:
"implies equal height" isn't true (e.g. (a+b)+(c+d) and ((a+b)+c)+d are
semantically equal but differ in height). Could you please reword it?
--
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]