Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/19861#discussion_r156969297 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala --- @@ -238,7 +239,16 @@ final class DataFrameWriter[T] private[sql](ds: Dataset[T]) { if (classOf[DataSourceV2].isAssignableFrom(cls)) { cls.newInstance() match { case ds: WriteSupport => - val options = new DataSourceV2Options(extraOptions.asJava) + val dataSource = cls.newInstance() --- End diff -- we can use `ds` directly here.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org