cloud-fan 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_r270735119
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/subquery.scala
##########
@@ -129,13 +134,14 @@ case class ReuseSubquery(conf: SQLConf) extends
Rule[SparkPlan] {
return plan
}
// Build a hash map using schema of subqueries to avoid O(N*N) sameResult
calls.
- val subqueries = mutable.HashMap[StructType, ArrayBuffer[SubqueryExec]]()
+ val subqueries = mutable.HashMap[StructType,
ArrayBuffer[BaseSubqueryExec]]()
plan transformAllExpressions {
case sub: ExecSubqueryExpression =>
- val sameSchema = subqueries.getOrElseUpdate(sub.plan.schema,
ArrayBuffer[SubqueryExec]())
+ val sameSchema =
+ subqueries.getOrElseUpdate(sub.plan.schema,
ArrayBuffer[BaseSubqueryExec]())
Review comment:
unnecessary change?
----------------------------------------------------------------
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]