Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/17289
  
    ```Scala
      test("saveAsTable API with SaveMode.Overwrite") {
        val df = spark.createDataFrame(sparkContext.parallelize(arr1x2), 
schema2)
        spark.read.jdbc(url1, "test.people", properties).show()
    
        df.write.format("jdbc").mode(SaveMode.ErrorIfExists)
          .option("url", url1)
          .option("dbtable", "test.people")
          .options(properties.asScala)
          .saveAsTable("j1")
        spark.read.jdbc(url1, "test.people", properties).show()
      }
    ```
    
    This is a test case I used. Previously, we respected the user-specified 
mode `SaveMode.ErrorIfExists`. Now, we are not sending the[ mode to the 
_createRelation_ API 
](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala#L181).
 It might be an unexpected behavior change to the external data source 
connector.


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