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

    https://github.com/apache/spark/pull/12252#discussion_r59823299
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ---
    @@ -246,13 +247,23 @@ object JdbcUtils extends Logging {
       }
     
       /**
    +   * The utility to add quote to the column name based on its dialect
    +   * @param dialect the JDBC dialect
    +   * @param columnName the input column name
    +   * @return the quoted column name
    +   */
    +  private def quoteColumnName(dialect: JdbcDialect, columnName: String): 
String = {
    +    dialect.quoteIdentifier(columnName)
    +  }
    +
    +  /**
        * Compute the schema string for this RDD.
        */
    -  def schemaString(df: DataFrame, url: String): String = {
    +  def schemaString(dialect: JdbcDialect, df: DataFrame, url: String): 
String = {
         val sb = new StringBuilder()
         val dialect = JdbcDialects.get(url)
    --- End diff --
    
    You pass in a parameter named dialect to the schemaString method, but 
there's also the dialect that comes from JdbcDialects.get(url) --- that's the 
duplicate I was trying to point out


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

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

Reply via email to