gengliangwang commented on a change in pull request #23824: [SPARK-26913][SQL] 
New data source V2 API: SupportsDirectWrite
URL: https://github.com/apache/spark/pull/23824#discussion_r257683322
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
 ##########
 @@ -264,6 +264,9 @@ final class DataFrameWriter[T] private[sql](ds: 
Dataset[T]) {
       val options = sessionOptions ++ extraOptions + checkFilesExistsOption
       val dsOptions = new DataSourceOptions(options.asJava)
       provider.getTable(dsOptions) match {
+        case table: SupportsDirectWrite =>
 
 Review comment:
   Creating `DataSourceV2Relation` requires table schema. Take file source as 
an example, Spark doesn't need to infer data schema here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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