Skip to content

Commit be2c224

Browse files
committed
Fix JDBC
1 parent da5c1ec commit be2c224

File tree

1 file changed

+4
-2
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc

1 file changed

+4
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JdbcUtils.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,10 @@ object JdbcUtils extends Logging {
819819
if (null != customSchema && customSchema.nonEmpty) {
820820
val userSchema = CatalystSqlParser.parseTableSchema(customSchema)
821821

822-
SchemaUtils.checkColumnNameDuplication(
823-
userSchema.map(_.name), "in the customSchema option value", nameEquality)
822+
SchemaUtils.checkSchemaColumnNameDuplication(
823+
userSchema,
824+
"in the customSchema option value",
825+
nameEquality)
824826

825827
// This is resolved by names, use the custom filed dataType to replace the default dataType.
826828
val newSchema = tableSchema.map { col =>

0 commit comments

Comments
 (0)