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

    https://github.com/apache/spark/pull/10312#discussion_r47673067
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCWriteSuite.scala ---
    @@ -96,6 +96,16 @@ class JDBCWriteSuite extends SharedSQLContext with 
BeforeAndAfter {
           2 === sqlContext.read.jdbc(url, "TEST.BASICCREATETEST", new 
Properties).collect()(0).length)
       }
     
    +  test("Basic CREATE with columnMapping") {
    +    val df = sqlContext.createDataFrame(sparkContext.parallelize(arr2x2), 
schema2)
    +
    +    val columnMapping = Map("name" -> "name", "id" -> "id")
    +    df.write.jdbc(url, "TEST.BASICCREATETEST", new Properties, 
columnMapping)
    +    assert(2 === sqlContext.read.jdbc(url, "TEST.BASICCREATETEST", new 
Properties).count)
    --- End diff --
    
    Final tiny nit -- I'd always put parens on a no-arg constructor call, since 
it has a side effect by definition. `new Properties()`


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