maropu commented on a change in pull request #28097: [SPARK-31325][SQL][Web UI]
Control a plan explain mode in the events of SQL listeners via SQLConf
URL: https://github.com/apache/spark/pull/28097#discussion_r402634528
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -845,4 +845,41 @@ class AdaptiveQueryExecSuite
}
}
}
+
+ test("control a plan explain mode in listeners via SQLConf") {
+
+ def checkPlanDescription(mode: String, expected: Seq[String]): Unit = {
+ var checkDone = false
+ val listener = new SparkListener {
+ override def onOtherEvent(event: SparkListenerEvent): Unit = {
+ event match {
+ case SparkListenerSQLAdaptiveExecutionUpdate(_, planDescription,
_) =>
+ assert(expected.forall(planDescription.contains))
+ checkDone = true
+ case _ => // ignore other events
+ }
+ }
+ }
+ spark.sparkContext.addSparkListener(listener)
+ withSQLConf(SQLConf.UI_EXPLAIN_MODE.key -> mode,
+ SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true",
+ SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "80") {
+ val dfApdaptive = sql("SELECT * FROM testData join testData2 ON key =
a where value = '1'")
Review comment:
Ah, yea. Also, capitalized `join`, too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]