yadavay-amzn commented on code in PR #56692:
URL: https://github.com/apache/spark/pull/56692#discussion_r3526301617


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/AsyncProgressTrackingMicroBatchExecutionSuite.scala:
##########
@@ -336,6 +336,26 @@ class AsyncProgressTrackingMicroBatchExecutionSuite
     e.getMessage should equal("Async progress tracking cannot be used with 
AvailableNow trigger")
   }
 
+  test("Fail with streaming sink evolution enabled") {
+    val inputData = new MemoryStream[Int](id = 0, spark)
+    val ds = inputData.toDF()
+
+    // The sink is intentionally left unnamed: the combination is rejected 
before the execution is
+    // constructed, so the error does not depend on whether name() is set.
+    withSQLConf(SQLConf.ENABLE_STREAMING_SINK_EVOLUTION.key -> "true") {
+      val e = intercept[SparkIllegalArgumentException] {
+        ds.writeStream
+          .format("noop")
+          .option(ASYNC_PROGRESS_TRACKING_ENABLED, true)
+          .start()
+      }
+      checkError(
+        e,
+        condition = 
"STREAMING_QUERY_EVOLUTION_ERROR.ASYNC_PROGRESS_TRACKING_NOT_SUPPORTED",
+        parameters = Map.empty)
+    }

Review Comment:
   Non-blocking: could add a companion assertion that the guard does *not* fire 
when only one of the two configs is set (e.g. `enableSinkEvolution=true` with 
async off still starts, or async on with `enableSinkEvolution=false` still 
starts). The current test proves the guard fires, but not that it's narrow, so 
a future broadening of the condition would go uncaught.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to