spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dongjoon-hyun <...@git.apache.org>
Subject [GitHub] spark pull request #14107: [SPARK-16387][SQL] JDBC Writer should use dialect...
Date Fri, 08 Jul 2016 21:10:44 GMT
GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/14107

    [SPARK-16387][SQL] JDBC Writer should use dialect to quote field names.

    ## What changes were proposed in this pull request?
    
    Currently, JDBC Writer uses dialects to get datatypes, but doesn't to quote field names.
This PR uses dialects to do that.
    
    **Reported Error Scenario (MySQL case)**
    ```scala
    scala> val url="jdbc:mysql://localhost:3306/temp"
    scala> val prop = new java.util.Properties
    scala> prop.setProperty("user","root")
    scala> spark.createDataset(Seq("a","b","c")).toDF("order")
    scala> df.write.mode("overwrite").jdbc(url, "temptable", prop)
    ...MySQLSyntaxErrorException: ... near 'order TEXT )
    ```
    
    ## How was this patch tested?
    
    Pass the Jenkins tests and manually do the above case.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-16387

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/14107.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #14107
    
----
commit 4f63716ab79811f10a129781be48537610fcd489
Author: Dongjoon Hyun <dongjoon@apache.org>
Date:   2016-07-08T20:54:10Z

    [SPARK-16387][SQL] JDBC Writer should use dialect to quote fieldnames.

----


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

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


Mime
View raw message