You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by we...@apache.org on 2020/02/10 14:15:04 UTC
[spark] branch branch-3.0 updated: [SPARK-30719][SQL] Add unit test
to verify the log warning print when intentionally skip AQE
This is an automated email from the ASF dual-hosted git repository.
wenchen pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 7c10a66 [SPARK-30719][SQL] Add unit test to verify the log warning print when intentionally skip AQE
7c10a66 is described below
commit 7c10a6664e06fc00f9be9704f473135b2cf3e48b
Author: jiake <ke...@intel.com>
AuthorDate: Mon Feb 10 21:48:00 2020 +0800
[SPARK-30719][SQL] Add unit test to verify the log warning print when intentionally skip AQE
### What changes were proposed in this pull request?
This is a follow up in [#27452](https://github.com/apache/spark/pull/27452).
Add a unit test to verify whether the log warning is print when intentionally skip AQE.
### Why are the changes needed?
Add unit test
### Does this PR introduce any user-facing change?
No
### How was this patch tested?
adding unit test
Closes #27515 from JkSelf/aqeLoggingWarningTest.
Authored-by: jiake <ke...@intel.com>
Signed-off-by: Wenchen Fan <we...@databricks.com>
(cherry picked from commit 5a240603fd920e3cb5d9ef49c31d46df8a630d8c)
Signed-off-by: Wenchen Fan <we...@databricks.com>
---
.../sql/execution/adaptive/AdaptiveQueryExecSuite.scala | 15 +++++++++++++++
1 file changed, 15 insertions(+)
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 96e9772..a207190 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
@@ -789,4 +789,19 @@ class AdaptiveQueryExecSuite
assert(plan.isInstanceOf[AdaptiveSparkPlanExec])
}
}
+
+ test("SPARK-30719: do not log warning if intentionally skip AQE") {
+ val testAppender = new LogAppender("aqe logging warning test when skip")
+ withLogAppender(testAppender) {
+ withSQLConf(
+ SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true") {
+ val plan = sql("SELECT * FROM testData").queryExecution.executedPlan
+ assert(!plan.isInstanceOf[AdaptiveSparkPlanExec])
+ }
+ }
+ assert(!testAppender.loggingEvents
+ .exists(msg => msg.getRenderedMessage.contains(
+ s"${SQLConf.ADAPTIVE_EXECUTION_ENABLED.key} is" +
+ s" enabled but is not supported for")))
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org