Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20579#discussion_r175858198
  
    --- 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 --
    
    actually we just need [this 
check](https://github.com/apache/spark/pull/20579/files#diff-ee26d4c4be21e92e92a02e9f16dbc285R71)
 here.


---

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

Reply via email to