Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16219#discussion_r91773409
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
 ---
    @@ -369,7 +369,9 @@ class StreamingQuerySuite extends StreamTest with 
BeforeAndAfter with Logging {
       testQuietly("StreamExecution metadata garbage collection") {
         val inputData = MemoryStream[Int]
         val mapped = inputData.toDS().map(6 / _)
    +    val prevMinBatchesToRetain = 
spark.conf.get("spark.sql.streaming.minBatchesToRetain")
     
    +    spark.conf.set("spark.sql.streaming.minBatchesToRetain", 1)
    --- End diff --
    
    nit: you can use
    ```
        withSQLConf(SQLConf.MIN_BATCHES_TO_RETAIN.key -> "1") {
          ...
        }
    ```
    to simplify the codes. `withSQLConf` will recover the conf.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to