dongjoon-hyun commented on a change in pull request #32559:
URL: https://github.com/apache/spark/pull/32559#discussion_r633214667
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/EquivalentExpressions.scala
##########
@@ -90,13 +90,20 @@ class EquivalentExpressions {
val exprSetForAll = mutable.Set[Expr]()
addExprTree(exprs.head, addExprToSet(_, exprSetForAll))
- val commonExprSet = exprs.tail.foldLeft(exprSetForAll) { (exprSet, expr) =>
+ val candidateExprs = exprs.tail.foldLeft(exprSetForAll) { (exprSet, expr)
=>
val otherExprSet = mutable.Set[Expr]()
addExprTree(expr, addExprToSet(_, otherExprSet))
exprSet.intersect(otherExprSet)
}
- commonExprSet.foreach(expr => addFunc(expr.e))
+ // Not all expressions in the set should be added. We should filter out
the subexprs.
Review comment:
Do we need to revise line 83 consistently?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]