You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2017/10/28 04:03:03 UTC
[GitHub] spark pull request #17631: [SPARK-20319][SQL] Already quoted identifiers are...
Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/17631#discussion_r147544807
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala ---
@@ -119,7 +119,7 @@ object JdbcUtils extends Logging {
isCaseSensitive: Boolean,
dialect: JdbcDialect): String = {
val columns = if (tableSchema.isEmpty) {
- rddSchema.fields.map(x => dialect.quoteIdentifier(x.name)).mkString(",")
+ rddSchema.fields.map(x => dialect.quoteIdentifier(x.name.replace("\"", ""))).mkString(",")
--- End diff --
This will replace all the quotes. We just need to `stripPrefix` and `stripSuffix` of double quotes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org