cloud-fan commented on code in PR #54517:
URL: https://github.com/apache/spark/pull/54517#discussion_r2878532653


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala:
##########
@@ -107,8 +107,17 @@ case class CreateDataSourceTableCommand(table: 
CatalogTable, ignoreIfExists: Boo
         table.copy(schema = new StructType(), partitionColumnNames = Nil)
 
       case _ =>
+        // Merge nullability from the user-specified schema into the resolved 
schema.
+        // DataSource.resolveRelation() calls dataSchema.asNullable which 
strips NOT NULL

Review Comment:
   is it simpler to not do `dataSchema.asNullable` if the flag is on?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to