MaxGekk commented on a change in pull request #29885:
URL: https://github.com/apache/spark/pull/29885#discussion_r500542489



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala
##########
@@ -221,4 +221,36 @@ class JDBCV2Suite extends QueryTest with 
SharedSparkSession {
       checkAnswer(sql("SELECT name, id FROM h2.test.abc"), Row("bob", 4))
     }
   }
+
+  test("DataFrameWriter: jdbc") {

Review comment:
       Other tests above have in their title `DataFrameWriterV2` but this one 
`DataFrameWriter`. Do you suppose to test v1 mostly here?

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala
##########
@@ -221,4 +221,36 @@ class JDBCV2Suite extends QueryTest with 
SharedSparkSession {
       checkAnswer(sql("SELECT name, id FROM h2.test.abc"), Row("bob", 4))
     }
   }
+
+  test("DataFrameWriter: jdbc") {
+    withTable("h2.test.abc") {
+      sql("CREATE TABLE h2.test.abc USING _ AS SELECT * FROM h2.test.people")
+      val df1 = Seq(("evan", 3)).toDF("NAME", "ID")
+      val df2 = Seq(("cathy", 4)).toDF("NAME", "ID")
+      val properties = new Properties()
+
+      df1.write
+        .mode("append")
+        .jdbc(url, "h2.test.abc", properties)
+      checkAnswer(sql("SELECT name, id FROM h2.test.abc"),
+        Seq(Row("fred", 1), Row("mary", 2), Row("evan", 3)))

Review comment:
       ```suggestion
         checkAnswer(
           sql("SELECT name, id FROM h2.test.abc"),
           Seq(Row("fred", 1), Row("mary", 2), Row("evan", 3)))
   ```




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

Reply via email to