@@ -502,35 +502,18 @@ index a206e97c353..79813d8e259 100644
502502
503503 test("SPARK-35884: Explain Formatted") {
504504diff --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..ca79ad8b6d9 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
508- @@ -23,6 +23,7 @@ import java.nio.file.{Files, StandardOpenOption}
509-
510- import scala.collection.mutable
511-
512- + import org.apache.comet.CometConf
513- import org.apache.hadoop.conf.Configuration
514- import org.apache.hadoop.fs.{LocalFileSystem, Path}
515-
516- @@ -33,6 +34,7 @@ import org.apache.spark.sql.catalyst.expressions.{AttributeReference, GreaterTha
508+ @@ -33,6 +33,7 @@ import org.apache.spark.sql.catalyst.expressions.{AttributeReference, GreaterTha
517509 import org.apache.spark.sql.catalyst.expressions.IntegralLiteralTestUtils.{negativeInt, positiveInt}
518510 import org.apache.spark.sql.catalyst.plans.logical.Filter
519511 import org.apache.spark.sql.catalyst.types.DataTypeUtils
520512+ import org.apache.spark.sql.comet.{CometBatchScanExec, CometNativeScanExec, CometScanExec, CometSortMergeJoinExec}
521513 import org.apache.spark.sql.execution.{FileSourceScanLike, SimpleMode}
522514 import org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanHelper
523515 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
516+ @@ -639,7 +640,8 @@ class FileBasedDataSourceSuite extends QueryTest
534517 }
535518
536519 Seq("parquet", "orc").foreach { format =>
@@ -540,31 +523,31 @@ index 93275487f29..510e3087e0f 100644
540523 withTempDir { dir =>
541524 val tableName = s"spark_25132_${format}_native"
542525 val tableDir = dir.getCanonicalPath + s"/$tableName"
543- @@ -955,6 +960 ,7 @@ class FileBasedDataSourceSuite extends QueryTest
526+ @@ -955,6 +957 ,7 @@ class FileBasedDataSourceSuite extends QueryTest
544527 assert(bJoinExec.isEmpty)
545528 val smJoinExec = collect(joinedDF.queryExecution.executedPlan) {
546529 case smJoin: SortMergeJoinExec => smJoin
547530+ case smJoin: CometSortMergeJoinExec => smJoin
548531 }
549532 assert(smJoinExec.nonEmpty)
550533 }
551- @@ -1015,6 +1021 ,7 @@ class FileBasedDataSourceSuite extends QueryTest
534+ @@ -1015,6 +1018 ,7 @@ class FileBasedDataSourceSuite extends QueryTest
552535
553536 val fileScan = df.queryExecution.executedPlan collectFirst {
554537 case BatchScanExec(_, f: FileScan, _, _, _, _) => f
555538+ case CometBatchScanExec(BatchScanExec(_, f: FileScan, _, _, _, _), _, _) => f
556539 }
557540 assert(fileScan.nonEmpty)
558541 assert(fileScan.get.partitionFilters.nonEmpty)
559- @@ -1056,6 +1063 ,7 @@ class FileBasedDataSourceSuite extends QueryTest
542+ @@ -1056,6 +1060 ,7 @@ class FileBasedDataSourceSuite extends QueryTest
560543
561544 val fileScan = df.queryExecution.executedPlan collectFirst {
562545 case BatchScanExec(_, f: FileScan, _, _, _, _) => f
563546+ case CometBatchScanExec(BatchScanExec(_, f: FileScan, _, _, _, _), _, _) => f
564547 }
565548 assert(fileScan.nonEmpty)
566549 assert(fileScan.get.partitionFilters.isEmpty)
567- @@ -1240,6 +1248 ,9 @@ class FileBasedDataSourceSuite extends QueryTest
550+ @@ -1240,6 +1245 ,9 @@ class FileBasedDataSourceSuite extends QueryTest
568551 val filters = df.queryExecution.executedPlan.collect {
569552 case f: FileSourceScanLike => f.dataFilters
570553 case b: BatchScanExec => b.scan.asInstanceOf[FileScan].dataFilters
@@ -965,7 +948,7 @@ index 3cf2bfd17ab..49728c35c42 100644
965948 SQLConf.ANSI_ENABLED.key -> "true") {
966949 withTable("t") {
967950diff --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
951+ index fa1a64460fc..134f0db1fb8 100644
969952--- a/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala
970953+++ b/sql/core/src/test/scala/org/apache/spark/sql/StringFunctionsSuite.scala
971954@@ -17,6 +17,8 @@
@@ -1134,31 +1117,18 @@ index d269290e616..13726a31e07 100644
11341117 }
11351118 }
11361119diff --git a/sql/core/src/test/scala/org/apache/spark/sql/connector/FileDataSourceV2FallBackSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/connector/FileDataSourceV2FallBackSuite.scala
1137- index cfc8b2cc845..b7c234e1437 100644
1120+ index cfc8b2cc845..c4be7eb3731 100644
11381121--- a/sql/core/src/test/scala/org/apache/spark/sql/connector/FileDataSourceV2FallBackSuite.scala
11391122+++ b/sql/core/src/test/scala/org/apache/spark/sql/connector/FileDataSourceV2FallBackSuite.scala
1140- @@ -19,8 +19,9 @@ package org.apache.spark.sql.connector
1141- import scala.collection.mutable.ArrayBuffer
1142-
1123+ @@ -21,6 +21,7 @@ import scala.collection.mutable.ArrayBuffer
11431124 import org.apache.spark.SparkConf
1144- - import org.apache.spark.sql.{AnalysisException, QueryTest}
1145- + import org.apache.spark.sql.{AnalysisException, IgnoreCometNativeDataFusion, QueryTest}
1125+ import org.apache.spark.sql.{AnalysisException, QueryTest}
11461126 import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
11471127+ import org.apache.spark.sql.comet.{CometNativeScanExec, CometScanExec}
11481128 import org.apache.spark.sql.connector.catalog.{SupportsRead, SupportsWrite, Table, TableCapability}
11491129 import org.apache.spark.sql.connector.read.ScanBuilder
11501130 import org.apache.spark.sql.connector.write.{LogicalWriteInfo, WriteBuilder}
1151- @@ -152,7 +153,8 @@ class FileDataSourceV2FallBackSuite extends QueryTest with SharedSparkSession {
1152- }
1153- }
1154-
1155- - test("Fallback Parquet V2 to V1") {
1156- + test("Fallback Parquet V2 to V1",
1157- + IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3315")) {
1158- Seq("parquet", classOf[ParquetDataSourceV2].getCanonicalName).foreach { format =>
1159- withSQLConf(SQLConf.USE_V1_SOURCE_LIST.key -> format) {
1160- val commands = ArrayBuffer.empty[(String, LogicalPlan)]
1161- @@ -184,7 +186,11 @@ class FileDataSourceV2FallBackSuite extends QueryTest with SharedSparkSession {
1131+ @@ -184,7 +185,11 @@ class FileDataSourceV2FallBackSuite extends QueryTest with SharedSparkSession {
11621132 val df = spark.read.format(format).load(path.getCanonicalPath)
11631133 checkAnswer(df, inputData.toDF())
11641134 assert(
@@ -1422,28 +1392,6 @@ index 47679ed7865..9ffbaecb98e 100644
14221392 }.length == hashAggCount)
14231393 assert(collectWithSubqueries(plan) { case s: SortAggregateExec => s }.length == sortAggCount)
14241394 }
1425- 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
1427- --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
1428- +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
1429- @@ -19,6 +19,7 @@ package org.apache.spark.sql.execution
1430-
1431- import org.apache.spark.{SparkArithmeticException, SparkException, SparkFileNotFoundException}
1432- import org.apache.spark.sql._
1433- + import org.apache.spark.sql.IgnoreCometNativeDataFusion
1434- import org.apache.spark.sql.catalyst.TableIdentifier
1435- import org.apache.spark.sql.catalyst.expressions.{Add, Alias, Divide}
1436- 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") {
14471395diff --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
14481396index eec396b2e39..bf3f1c769d6 100644
14491397--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala
@@ -2930,39 +2878,6 @@ index aad91601758..201083bd621 100644
29302878 })
29312879 }
29322880
2933- diff --git a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
2934- index b5cf13a9c12..ac17603fb7f 100644
2935- --- a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
2936- +++ b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
2937- @@ -36,7 +36,7 @@ import org.scalatestplus.mockito.MockitoSugar
2938-
2939- import org.apache.spark.{SparkException, TestUtils}
2940- import org.apache.spark.internal.Logging
2941- - import org.apache.spark.sql.{AnalysisException, Column, DataFrame, Dataset, Row, SaveMode}
2942- + import org.apache.spark.sql.{AnalysisException, Column, DataFrame, Dataset, IgnoreCometNativeDataFusion, Row, SaveMode}
2943- import org.apache.spark.sql.catalyst.InternalRow
2944- import org.apache.spark.sql.catalyst.expressions.{Literal, Rand, Randn, Shuffle, Uuid}
2945- import org.apache.spark.sql.catalyst.plans.logical.{CTERelationDef, CTERelationRef, LocalRelation}
2946- @@ -660,7 +660,8 @@ class StreamingQuerySuite extends StreamTest with BeforeAndAfter with Logging wi
2947- )
2948- }
2949-
2950- - test("SPARK-41198: input row calculation with CTE") {
2951- + test("SPARK-41198: input row calculation with CTE",
2952- + IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3315")) {
2953- withTable("parquet_tbl", "parquet_streaming_tbl") {
2954- spark.range(0, 10).selectExpr("id AS col1", "id AS col2")
2955- .write.format("parquet").saveAsTable("parquet_tbl")
2956- @@ -712,7 +713,8 @@ class StreamingQuerySuite extends StreamTest with BeforeAndAfter with Logging wi
2957- }
2958- }
2959-
2960- - test("SPARK-41199: input row calculation with mixed-up of DSv1 and DSv2 streaming sources") {
2961- + test("SPARK-41199: input row calculation with mixed-up of DSv1 and DSv2 streaming sources",
2962- + IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3315")) {
2963- withTable("parquet_streaming_tbl") {
2964- val streamInput = MemoryStream[Int]
2965- val streamDf = streamInput.toDF().selectExpr("value AS key", "value AS value_stream")
29662881diff --git a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingSelfUnionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingSelfUnionSuite.scala
29672882index 8f099c31e6b..ce4b7ad25b3 100644
29682883--- a/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingSelfUnionSuite.scala
0 commit comments