rdblue commented on a change in pull request #25465: [SPARK-28747][SQL] merge 
the two data source v2 fallback configs
URL: https://github.com/apache/spark/pull/25465#discussion_r317223855
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
 ##########
 @@ -835,14 +832,12 @@ final class DataFrameWriter[T] private[sql](ds: 
Dataset[T]) {
 
   private def modeForDSV2 = mode.getOrElse(SaveMode.Append)
 
-  private def canUseV2Source(session: SparkSession, providerClass: Class[_]): 
Boolean = {
-    val useV1Sources =
-      
session.sessionState.conf.useV1SourceWriterList.toLowerCase(Locale.ROOT).split(",")
-    val shouldUseV1Source = providerClass.newInstance() match {
-      case d: DataSourceRegister if useV1Sources.contains(d.shortName()) => 
true
-      case _ => 
useV1Sources.contains(providerClass.getCanonicalName.toLowerCase(Locale.ROOT))
+  private def lookupV2Provider() = {
+    DataSource.lookupDataSourceV2(source, df.sparkSession.sessionState.conf) 
match {
+      // File source v2 write path is currently broken.
+      case Some(_: FileDataSourceV2) => None
 
 Review comment:
   I think you're right that this is not affected by the metastore problem 
because this is reading a path-based table and not a metastore table.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to