gengliangwang commented on code in PR #51466:
URL: https://github.com/apache/spark/pull/51466#discussion_r2226071034
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala:
##########
@@ -114,17 +116,18 @@ object FileFormatWriter extends Logging {
val caseInsensitiveOptions = CaseInsensitiveMap(options)
- val dataSchema = dataColumns.toStructType
- DataSourceUtils.verifySchema(fileFormat, dataSchema)
- DataSourceUtils.checkFieldNames(fileFormat, dataSchema)
+ val tableSchema = finalOutputSpec.tableSchema
Review Comment:
From line 112:
```
val dataColumns =
finalOutputSpec.outputColumns.filterNot(partitionSet.contains)
```
We should filter out the partition columns from `tableSchema` as well
--
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]