Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/5798#discussion_r29994765
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/package.scala
---
@@ -77,4 +77,29 @@ package object expressions {
/** Uses the given row to store the output of the projection. */
def target(row: MutableRow): MutableProjection
}
+
+ /**
+ * A utility classes for check the expression equality in semantic, not
literally.
+ */
+ trait ExpressionEquals
+
+ private[this] class AttributeRefEquals(private val normalized:
Expression)
+ extends ExpressionEquals {
+ override def equals(other: Any): Boolean = other match {
+ case o: AttributeRefEquals => normalized == o.normalized
+ case _ => false
+ }
+
+ override def hashCode(): Int = normalized.hashCode()
+ }
+
+ object ExpressionEquals {
--- End diff --
Why not follow the pattern already created by `AttributeSet` and create an
`ExpressionSet`/`ExpressionMap` (with tests)?
---
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]