viirya commented on a change in pull request #25717: [SPARK-29013][SQL]
Structurally equivalent subexpression elimination
URL: https://github.com/apache/spark/pull/25717#discussion_r324440294
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/EquivalentExpressions.scala
##########
@@ -40,23 +40,47 @@ class EquivalentExpressions {
override def hashCode: Int = e.semanticHash()
}
+ /**
+ * Wrapper around an Expression that provides structural semantic equality.
+ */
+ case class StructuralExpr(e: Expression) {
+ def normalized(expr: Expression): Expression = {
+ expr.transformUp {
+ case b: ParameterizedBoundReference =>
Review comment:
I think I figured why. Made another commit.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]