Skip to content

Commit 90ecaa2

Browse files
committed
fix: remove test skips for file-not-found in 3.5.8 diff
Remove the assume() skip for native_datafusion in FileBasedDataSourceSuite and the IgnoreCometNativeDataFusion tag in SimpleSQLViewSuite, since file-not-found errors now produce the correct SparkFileNotFoundException type.
1 parent b97571e commit 90ecaa2

1 file changed

Lines changed: 13 additions & 42 deletions

File tree

dev/diffs/3.5.8.diff

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ index a206e97c353..79813d8e259 100644
502502

503503
test("SPARK-35884: Explain Formatted") {
504504
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
505-
index 93275487f29..510e3087e0f 100644
505+
index 93275487f29..55902457a16 100644
506506
--- a/sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
507507
+++ b/sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
508508
@@ -23,6 +23,7 @@ import java.nio.file.{Files, StandardOpenOption}
@@ -521,16 +521,7 @@ index 93275487f29..510e3087e0f 100644
521521
import org.apache.spark.sql.execution.{FileSourceScanLike, SimpleMode}
522522
import org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanHelper
523523
import org.apache.spark.sql.execution.datasources.FilePartition
524-
@@ -250,6 +252,8 @@ class FileBasedDataSourceSuite extends QueryTest
525-
case "" => "_LEGACY_ERROR_TEMP_2062"
526-
case _ => "_LEGACY_ERROR_TEMP_2055"
527-
}
528-
+ // native_datafusion Parquet scan cannot throw a SparkFileNotFoundException
529-
+ assume(CometConf.COMET_NATIVE_SCAN_IMPL.get() != CometConf.SCAN_NATIVE_DATAFUSION)
530-
checkErrorMatchPVals(
531-
exception = intercept[SparkException] {
532-
testIgnoreMissingFiles(options)
533-
@@ -639,7 +643,8 @@ class FileBasedDataSourceSuite extends QueryTest
524+
@@ -639,7 +641,8 @@ class FileBasedDataSourceSuite extends QueryTest
534525
}
535526

536527
Seq("parquet", "orc").foreach { format =>
@@ -540,31 +531,31 @@ index 93275487f29..510e3087e0f 100644
540531
withTempDir { dir =>
541532
val tableName = s"spark_25132_${format}_native"
542533
val tableDir = dir.getCanonicalPath + s"/$tableName"
543-
@@ -955,6 +960,7 @@ class FileBasedDataSourceSuite extends QueryTest
534+
@@ -955,6 +958,7 @@ class FileBasedDataSourceSuite extends QueryTest
544535
assert(bJoinExec.isEmpty)
545536
val smJoinExec = collect(joinedDF.queryExecution.executedPlan) {
546537
case smJoin: SortMergeJoinExec => smJoin
547538
+ case smJoin: CometSortMergeJoinExec => smJoin
548539
}
549540
assert(smJoinExec.nonEmpty)
550541
}
551-
@@ -1015,6 +1021,7 @@ class FileBasedDataSourceSuite extends QueryTest
542+
@@ -1015,6 +1019,7 @@ class FileBasedDataSourceSuite extends QueryTest
552543

553544
val fileScan = df.queryExecution.executedPlan collectFirst {
554545
case BatchScanExec(_, f: FileScan, _, _, _, _) => f
555546
+ case CometBatchScanExec(BatchScanExec(_, f: FileScan, _, _, _, _), _, _) => f
556547
}
557548
assert(fileScan.nonEmpty)
558549
assert(fileScan.get.partitionFilters.nonEmpty)
559-
@@ -1056,6 +1063,7 @@ class FileBasedDataSourceSuite extends QueryTest
550+
@@ -1056,6 +1061,7 @@ class FileBasedDataSourceSuite extends QueryTest
560551

561552
val fileScan = df.queryExecution.executedPlan collectFirst {
562553
case BatchScanExec(_, f: FileScan, _, _, _, _) => f
563554
+ case CometBatchScanExec(BatchScanExec(_, f: FileScan, _, _, _, _), _, _) => f
564555
}
565556
assert(fileScan.nonEmpty)
566557
assert(fileScan.get.partitionFilters.isEmpty)
567-
@@ -1240,6 +1248,9 @@ class FileBasedDataSourceSuite extends QueryTest
558+
@@ -1240,6 +1246,9 @@ class FileBasedDataSourceSuite extends QueryTest
568559
val filters = df.queryExecution.executedPlan.collect {
569560
case f: FileSourceScanLike => f.dataFilters
570561
case b: BatchScanExec => b.scan.asInstanceOf[FileScan].dataFilters
@@ -965,7 +956,7 @@ index 3cf2bfd17ab..49728c35c42 100644
965956
SQLConf.ANSI_ENABLED.key -> "true") {
966957
withTable("t") {
967958
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala
968-
index fa1a64460fc..1d2e215d6a3 100644
959+
index fa1a64460fc..134f0db1fb8 100644
969960
--- a/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala
970961
+++ b/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala
971962
@@ -17,6 +17,8 @@
@@ -1423,7 +1414,7 @@ index 47679ed7865..9ffbaecb98e 100644
14231414
assert(collectWithSubqueries(plan) { case s: SortAggregateExec => s }.length == sortAggCount)
14241415
}
14251416
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
1426-
index a1147c16cc8..c7a29496328 100644
1417+
index a1147c16cc8..90085de90d4 100644
14271418
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
14281419
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
14291420
@@ -19,6 +19,7 @@ package org.apache.spark.sql.execution
@@ -1434,16 +1425,6 @@ index a1147c16cc8..c7a29496328 100644
14341425
import org.apache.spark.sql.catalyst.TableIdentifier
14351426
import org.apache.spark.sql.catalyst.expressions.{Add, Alias, Divide}
14361427
import org.apache.spark.sql.catalyst.parser.ParseException
1437-
@@ -968,7 +969,8 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
1438-
}
1439-
}
1440-
1441-
- test("alter temporary view should follow current storeAnalyzedPlanForView config") {
1442-
+ test("alter temporary view should follow current storeAnalyzedPlanForView config",
1443-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3314")) {
1444-
withTable("t") {
1445-
Seq(2, 3, 1).toDF("c1").write.format("parquet").saveAsTable("t")
1446-
withView("v1") {
14471428
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala
14481429
index eec396b2e39..bf3f1c769d6 100644
14491430
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala
@@ -2038,7 +2019,7 @@ index 07e2849ce6f..3e73645b638 100644
20382019
ParquetOutputFormat.WRITER_VERSION -> ParquetProperties.WriterVersion.PARQUET_2_0.toString
20392020
)
20402021
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
2041-
index 8e88049f51e..49f2001dc6b 100644
2022+
index 8e88049f51e..e21a5797996 100644
20422023
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
20432024
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
20442025
@@ -1095,7 +1095,11 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
@@ -2127,17 +2108,7 @@ index 8e88049f51e..49f2001dc6b 100644
21272108
val schema = StructType(Seq(
21282109
StructField("a", IntegerType, nullable = false)
21292110
))
2130-
@@ -1933,7 +1949,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
2131-
}
2132-
}
2133-
2134-
- test("SPARK-25207: exception when duplicate fields in case-insensitive mode") {
2135-
+ test("SPARK-25207: exception when duplicate fields in case-insensitive mode",
2136-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3311")) {
2137-
withTempPath { dir =>
2138-
val count = 10
2139-
val tableName = "spark_25207"
2140-
@@ -1984,7 +2001,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
2111+
@@ -1984,7 +2000,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
21412112
}
21422113
}
21432114

@@ -2147,7 +2118,7 @@ index 8e88049f51e..49f2001dc6b 100644
21472118
// block 1:
21482119
// null count min max
21492120
// page-0 0 0 99
2150-
@@ -2044,7 +2062,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
2121+
@@ -2044,7 +2061,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
21512122
}
21522123
}
21532124

@@ -2157,7 +2128,7 @@ index 8e88049f51e..49f2001dc6b 100644
21572128
withTempPath { dir =>
21582129
val path = dir.getCanonicalPath
21592130
spark.range(100).selectExpr("id * 2 AS id")
2160-
@@ -2276,7 +2295,11 @@ class ParquetV1FilterSuite extends ParquetFilterSuite {
2131+
@@ -2276,7 +2294,11 @@ class ParquetV1FilterSuite extends ParquetFilterSuite {
21612132
assert(pushedParquetFilters.exists(_.getClass === filterClass),
21622133
s"${pushedParquetFilters.map(_.getClass).toList} did not contain ${filterClass}.")
21632134

@@ -2170,7 +2141,7 @@ index 8e88049f51e..49f2001dc6b 100644
21702141
} else {
21712142
assert(selectedFilters.isEmpty, "There is filter pushed down")
21722143
}
2173-
@@ -2336,7 +2359,11 @@ class ParquetV2FilterSuite extends ParquetFilterSuite {
2144+
@@ -2336,7 +2358,11 @@ class ParquetV2FilterSuite extends ParquetFilterSuite {
21742145
assert(pushedParquetFilters.exists(_.getClass === filterClass),
21752146
s"${pushedParquetFilters.map(_.getClass).toList} did not contain ${filterClass}.")
21762147

0 commit comments

Comments
 (0)