maropu commented on a change in pull request #24258:
[SPARK-27279][SQL][FOLLOW-UP] Reuse subquery should compare child plan of
`SubqueryExec`
URL: https://github.com/apache/spark/pull/24258#discussion_r270695169
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala
##########
@@ -58,11 +61,11 @@ abstract class SubqueryExpression(
children.zip(p.children).forall(p => p._1.semanticEquals(p._2))
case _ => false
}
- def canonicalize(attrs: AttributeSeq): SubqueryExpression = {
+ override def canonicalize(attrs: AttributeSeq): SubqueryExpression = {
// Normalize the outer references in the subquery plan.
val normalizedPlan = plan.transformAllExpressions {
case OuterReference(r) => OuterReference(QueryPlan.normalizeExprId(r,
attrs))
- }
+ }.canonicalized
Review comment:
We need to the canonicalized plan here? It seems all the canonicalization
should happen in line 69?
----------------------------------------------------------------
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]