spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dongjoon-hyun <>
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:

    [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> 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 SPARK-16387

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

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message