Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20579#discussion_r175854733
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
---
@@ -546,6 +546,10 @@ case class DataSource(
case dataSource: CreatableRelationProvider =>
SaveIntoDataSourceCommand(data, dataSource,
caseInsensitiveOptions, mode)
case format: FileFormat =>
+ if (DataSource.isBuiltInFileBasedDataSource(format) &&
data.schema.size == 0) {
--- End diff --
We don't need this check. `FileFormat` is internal, we don't need to
distinguish between built-in file format or external ones.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]