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

    https://github.com/apache/spark/pull/17758#discussion_r121878933
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala
 ---
    @@ -741,14 +742,7 @@ object JdbcUtils extends Logging {
         val nameEquality = df.sparkSession.sessionState.conf.resolver
     
         // checks duplicate columns in the user specified column types.
    -    userSchema.fieldNames.foreach { col =>
    -      val duplicatesCols = userSchema.fieldNames.filter(nameEquality(_, 
col))
    -      if (duplicatesCols.size >= 2) {
    -        throw new AnalysisException(
    -          "Found duplicate column(s) in createTableColumnTypes option 
value: " +
    -            duplicatesCols.mkString(", "))
    -      }
    -    }
    +    SchemaUtils.checkSchemaColumnNameDuplication(userSchema, 
"createTableColumnTypes option value")
    --- End diff --
    
    In this JDBC case, we currently ignore case-sensitivity. IMHO we might need 
to a JDBC data source option for case-sensitivity?


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