Skip to content

Commit ad79ae1

Browse files
gatorsmiledongjoon-hyun
authored andcommitted
[SPARK-31424][SQL] Rename AdaptiveSparkPlanHelper.collectInPlanAndSubqueries to collectWithSubqueries
### What changes were proposed in this pull request? Like apache#28092, this PR is to rename `QueryPlan.collectInPlanAndSubqueries` in AdaptiveSparkPlanHelper to `collectWithSubqueries` ### Why are the changes needed? The old name is too verbose. `QueryPlan` is internal but it's the core of catalyst and we'd better make the API name clearer before we release it. ### Does this PR introduce any user-facing change? no ### How was this patch tested? N/A Closes apache#28193 from gatorsmile/spark-31322. Authored-by: gatorsmile <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent fda910d commit ad79ae1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanHelper.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ trait AdaptiveSparkPlanHelper {
109109
* Returns a sequence containing the result of applying a partial function to all elements in this
110110
* plan, also considering all the plans in its (nested) subqueries
111111
*/
112-
def collectInPlanAndSubqueries[B](p: SparkPlan)(f: PartialFunction[SparkPlan, B]): Seq[B] = {
112+
def collectWithSubqueries[B](p: SparkPlan)(f: PartialFunction[SparkPlan, B]): Seq[B] = {
113113
(p +: subqueriesAll(p)).flatMap(collect(_)(f))
114114
}
115115

sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ class AdaptiveQueryExecSuite
9494
}
9595

9696
private def findReusedExchange(plan: SparkPlan): Seq[ReusedExchangeExec] = {
97-
collectInPlanAndSubqueries(plan) {
97+
collectWithSubqueries(plan) {
9898
case ShuffleQueryStageExec(_, e: ReusedExchangeExec) => e
9999
case BroadcastQueryStageExec(_, e: ReusedExchangeExec) => e
100100
}
101101
}
102102

103103
private def findReusedSubquery(plan: SparkPlan): Seq[ReusedSubqueryExec] = {
104-
collectInPlanAndSubqueries(plan) {
104+
collectWithSubqueries(plan) {
105105
case e: ReusedSubqueryExec => e
106106
}
107107
}

0 commit comments

Comments
 (0)