This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new ad79ae1 [SPARK-31424][SQL] Rename
AdaptiveSparkPlanHelper.collectInPlanAndSubqueries to collectWithSubqueries
ad79ae1 is described below
commit ad79ae11ba1cf30cd496f5edc4c8a9a109fd4a0e
Author: gatorsmile <[email protected]>
AuthorDate: Sun Apr 12 13:10:57 2020 -0700
[SPARK-31424][SQL] Rename
AdaptiveSparkPlanHelper.collectInPlanAndSubqueries to collectWithSubqueries
### What changes were proposed in this pull request?
Like https://github.com/apache/spark/pull/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 #28193 from gatorsmile/spark-31322.
Authored-by: gatorsmile <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../apache/spark/sql/execution/adaptive/AdaptiveSparkPlanHelper.scala | 2 +-
.../apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanHelper.scala
b/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanHelper.scala
index 61ae6cb..cd87230 100644
---
a/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanHelper.scala
+++
b/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanHelper.scala
@@ -109,7 +109,7 @@ trait AdaptiveSparkPlanHelper {
* Returns a sequence containing the result of applying a partial function
to all elements in this
* plan, also considering all the plans in its (nested) subqueries
*/
- def collectInPlanAndSubqueries[B](p: SparkPlan)(f:
PartialFunction[SparkPlan, B]): Seq[B] = {
+ def collectWithSubqueries[B](p: SparkPlan)(f: PartialFunction[SparkPlan,
B]): Seq[B] = {
(p +: subqueriesAll(p)).flatMap(collect(_)(f))
}
diff --git
a/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
b/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
index ffbb828..64c99a9 100644
---
a/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
+++
b/sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
@@ -94,14 +94,14 @@ class AdaptiveQueryExecSuite
}
private def findReusedExchange(plan: SparkPlan): Seq[ReusedExchangeExec] = {
- collectInPlanAndSubqueries(plan) {
+ collectWithSubqueries(plan) {
case ShuffleQueryStageExec(_, e: ReusedExchangeExec) => e
case BroadcastQueryStageExec(_, e: ReusedExchangeExec) => e
}
}
private def findReusedSubquery(plan: SparkPlan): Seq[ReusedSubqueryExec] = {
- collectInPlanAndSubqueries(plan) {
+ collectWithSubqueries(plan) {
case e: ReusedSubqueryExec => e
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]