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

    https://github.com/apache/spark/pull/16220#discussion_r91647359
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/streaming/test/DataStreamReaderWriterSuite.scala
 ---
    @@ -575,4 +576,58 @@ class DataStreamReaderWriterSuite extends StreamTest 
with BeforeAndAfter {
           sq.stop()
         }
       }
    +
    +  test("user specified checkpointLocation precedes SQLConf") {
    +    import testImplicits._
    +    withTempDir { checkpointPath =>
    +      withTempPath { userCheckpointPath =>
    +        assert(!userCheckpointPath.exists(), s"$userCheckpointPath should 
not exist")
    +        withSQLConf(SQLConf.CHECKPOINT_LOCATION.key -> 
checkpointPath.getAbsolutePath) {
    +          val queryName = "test_query"
    +          val ds = MemoryStream[Int].toDS
    +          ds.writeStream
    +            .format("memory")
    +            .queryName(queryName)
    +            .option("checkpointLocation", 
userCheckpointPath.getAbsolutePath)
    +            .start()
    +            .stop()
    +          // Should not use SQLConf
    +          assert(checkpointPath.listFiles().isEmpty, 
s"${checkpointPath.listFiles()} is not empty")
    +          // Should use `userCheckpointPath` directly
    +          assert(userCheckpointPath.exists(), s"$userCheckpointPath 
doesn't exist")
    --- End diff --
    
    same nit on failure message as above


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to