cloud-fan commented on a change in pull request #26257: [SPARK-29606][SQL]
Improve EliminateOuterJoin performance
URL: https://github.com/apache/spark/pull/26257#discussion_r347533696
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
##########
@@ -176,10 +176,16 @@ abstract class UnaryNode extends LogicalPlan {
allConstraints += EqualNullSafe(a.toAttribute, l)
case a @ Alias(e, _) =>
// For every alias in `projectList`, replace the reference in
constraints by its attribute.
- allConstraints ++= allConstraints.map(_ transform {
- case expr: Expression if expr.semanticEquals(e) =>
- a.toAttribute
- })
+ allConstraints ++= allConstraints.map {
+ case e @ EqualNullSafe(l, _: AttributeReference)
+ if !l.isInstanceOf[AttributeReference] => e
Review comment:
This is just an example. Why can we ignore `EqualNullSafe` between attr and
non-attr? Are they guaranteed to produce useless constraints?
----------------------------------------------------------------
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]