cloud-fan 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_r315660966
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/FileDataSourceV2FallBackSuite.scala
 ##########
 @@ -130,55 +130,9 @@ class FileDataSourceV2FallBackSuite extends QueryTest 
with SharedSparkSession {
     }
   }
 
-  test("Fall back to v1 when reading file with write only FileDataSourceV2") {
-    val df = spark.range(10).toDF()
-    withTempPath { file =>
-      val path = file.getCanonicalPath
-      // Dummy File writer should fail as expected.
-      withSQLConf(SQLConf.USE_V1_SOURCE_WRITER_LIST.key -> "") {
-        val exception = intercept[AnalysisException] {
-          df.write.format(dummyParquetWriterV2).save(path)
-        }
-        assert(exception.message.equals("Dummy file writer"))
-      }
-      df.write.parquet(path)
-      // Fallback reads to V1
-      checkAnswer(spark.read.format(dummyParquetWriterV2).load(path), df)
-    }
-  }
-
-  test("Fall back write path to v1 with configuration 
USE_V1_SOURCE_WRITER_LIST") {
-    val df = spark.range(10).toDF()
-    Seq(
-      "foo,parquet,bar",
-      "ParQuet,bar,foo",
-      s"foobar,$dummyParquetWriterV2"
-    ).foreach { fallbackWriters =>
-      withSQLConf(SQLConf.USE_V1_SOURCE_WRITER_LIST.key -> fallbackWriters) {
-        withTempPath { file =>
-          val path = file.getCanonicalPath
-          // Writes should fall back to v1 and succeed.
-          df.write.format(dummyParquetWriterV2).save(path)
-          checkAnswer(spark.read.parquet(path), df)
-        }
-      }
-    }
-    withSQLConf(SQLConf.USE_V1_SOURCE_WRITER_LIST.key -> "foo,bar") {
-      withTempPath { file =>
-        val path = file.getCanonicalPath
-        // Dummy File reader should fail as USE_V1_SOURCE_READER_LIST doesn't 
include it.
 
 Review comment:
   ditto

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to