Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/6173#discussion_r30387349
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
---
@@ -76,6 +76,12 @@ abstract class Expression extends TreeNode[Expression] {
case u: UnresolvedAttribute => PrettyAttribute(u.name)
}.toString
}
+
+ def semanticEquals(other: Expression): Boolean = this.getClass ==
other.getClass &&
+
this.productIterator.zip(other.asInstanceOf[Product].productIterator).forall {
+ case (e1: Expression, e2: Expression) => e1 semanticEquals e2
+ case (i1, i2) => i1 == i2
--- End diff --
The difficulty here is we probably never knows `semanticEquals` in a
general way, that's why I said we need to re-implemented for lots of
expressions if we added this.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]