You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2024/05/01 19:37:34 UTC
(spark) branch master updated: [SPARK-48070][SQL][TESTS] Support `AdaptiveQueryExecSuite.runAdaptiveAndVerifyResult` to skip check results
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 35767bb09fe1 [SPARK-48070][SQL][TESTS] Support `AdaptiveQueryExecSuite.runAdaptiveAndVerifyResult` to skip check results
35767bb09fe1 is described below
commit 35767bb09fe13468c03ffbb3a45e106e8b8eb179
Author: sychen <sy...@ctrip.com>
AuthorDate: Wed May 1 12:37:24 2024 -0700
[SPARK-48070][SQL][TESTS] Support `AdaptiveQueryExecSuite.runAdaptiveAndVerifyResult` to skip check results
### What changes were proposed in this pull request?
This PR aims to support AdaptiveQueryExecSuite to skip check results.
### Why are the changes needed?
https://github.com/apache/spark/pull/46273#discussion_r1585445992
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
GA
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #46316 from cxzl25/SPARK-48070.
Authored-by: sychen <sy...@ctrip.com>
Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
.../spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
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 f6ca7ff3cdcc..d74ecb32971c 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
@@ -64,7 +64,8 @@ class AdaptiveQueryExecSuite
setupTestData()
- private def runAdaptiveAndVerifyResult(query: String): (SparkPlan, SparkPlan) = {
+ private def runAdaptiveAndVerifyResult(query: String,
+ skipCheckAnswer: Boolean = false): (SparkPlan, SparkPlan) = {
var finalPlanCnt = 0
var hasMetricsEvent = false
val listener = new SparkListener {
@@ -88,8 +89,10 @@ class AdaptiveQueryExecSuite
assert(planBefore.toString.startsWith("AdaptiveSparkPlan isFinalPlan=false"))
val result = dfAdaptive.collect()
withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false") {
- val df = sql(query)
- checkAnswer(df, result.toImmutableArraySeq)
+ if (!skipCheckAnswer) {
+ val df = sql(query)
+ checkAnswer(df, result.toImmutableArraySeq)
+ }
}
val planAfter = dfAdaptive.queryExecution.executedPlan
assert(planAfter.toString.startsWith("AdaptiveSparkPlan isFinalPlan=true"))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org