File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,13 @@ object ExplainUtils {
97
97
getSubqueries(plan, subqueries)
98
98
var i = 0
99
99
100
- // Process all the subqueries in the plan.
100
+ /**
101
+ * 1. [[getSubqueries ]] collects the child plan [[BaseSubqueryExec ]]
102
+ * 2. [[processPlan ]] checks the collected child plan of [[BaseSubqueryExec ]]. If child plan
103
+ * is an instance of [[BaseSubqueryExec ]] (happens in case of `ReusedSubqueryExec`), then
104
+ * it skips calling [[processPlanSkippingSubqueries ]] in order to avoid printing the same
105
+ * subquery plan more than once.
106
+ */
101
107
for (sub <- subqueries) {
102
108
if (i == 0 ) {
103
109
append(" \n ===== Subqueries =====\n\n " )
@@ -201,7 +207,7 @@ object ExplainUtils {
201
207
e.plan match {
202
208
case s : BaseSubqueryExec =>
203
209
subqueries += ((p, e, s.child))
204
- getSubqueries(e.plan , subqueries)
210
+ getSubqueries(s , subqueries)
205
211
}
206
212
case other =>
207
213
})
You can’t perform that action at this time.
0 commit comments