rdblue commented on a change in pull request #25305: [SPARK-28572][SQL] Simple 
analyzer checks for CREATE TABLE v2
URL: https://github.com/apache/spark/pull/25305#discussion_r309464550
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceResolution.scala
 ##########
 @@ -245,6 +246,55 @@ case class DataSourceResolution(
       catalog: TableCatalog,
       identifier: Identifier,
       create: CreateTableStatement): CreateV2Table = {
+
+    val isCaseSensitive = conf.caseSensitiveAnalysis
+    // Check that columns are not duplicated in the schema
+    val flattenedSchema = 
SchemaUtils.explodeNestedFieldNames(create.tableSchema)
+    SchemaUtils.checkColumnNameDuplication(
 
 Review comment:
   This is not allowed for any table, right? I think it should be added to 
CheckAnalysis.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to