ulysses-you commented on a change in pull request #31830:
URL: https://github.com/apache/spark/pull/31830#discussion_r594826770
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLExecutionSuite.scala
##########
@@ -157,6 +161,45 @@ class SQLExecutionSuite extends SparkFunSuite {
}
}
}
+
+ test("SPARK-34735: Add modified configs for SQL execution in UI") {
+ val spark = SparkSession.builder()
+ .master("local[*]")
+ .appName("test")
+ .config("k1", "v1")
+ .getOrCreate()
+
+ try {
+ val index = new AtomicInteger(0)
+ spark.sparkContext.addSparkListener(new SparkListener {
+ override def onOtherEvent(event: SparkListenerEvent): Unit = event
match {
+ case start: SparkListenerSQLExecutionStart =>
+ if (index.get() == 0 && hasProject(start)) {
+ assert(!start.modifiedConfigs.contains("k1"))
+ index.incrementAndGet()
+ } else if (index.get() == 1 && hasProject(start)) {
+ assert(start.modifiedConfigs.contains("k2"))
+ assert(start.modifiedConfigs("k2") == "v2")
+ assert(start.modifiedConfigs.contains("redaction.password"))
+ assert(start.modifiedConfigs("redaction.password") ==
REDACTION_REPLACEMENT_TEXT)
Review comment:
thank you @dongjoon-hyun , the redaction is missed before and now is
enable. This test is for your request about redaction, please let me know if
there miss anything else.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]