Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add unit test to verify the log warning print when skip AQE
  • Loading branch information
JkSelf committed Feb 10, 2020
commit 98806c7eaa8f0cb6fac9894a0f03f6d4a6b5cd1e
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
}
}