Skip to content

Commit 6338c98

Browse files
committed
test: extend SPARK-43402 plan-match to CometNativeScanExec and retag to #4042
The SubquerySuite "SPARK-43402: FileSourceScanExec supports push down data filter with scalar subquery" test was tagged against #3315 in #4041 for native_datafusion. Its first failure was just a missed pattern match; adding CometNativeScanExec to the plan collection gets past that assertion, but the test then fails on a genuine behavior gap: the pushed scalar subquery is a plain Subquery rather than ReusedSubqueryExec, so reuse does not happen. Extend the test's plan-match to cover CometNativeScanExec (paralleling the existing FileSourceScanLike and CometScanExec cases) and retag the ignore to the new narrower tracking issue #4042.
1 parent b98a736 commit 6338c98

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

dev/diffs/4.0.1.diff

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ index 0df7f806272..92390bd819f 100644
13191319

13201320
test("non-matching optional group") {
13211321
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala
1322-
index 2e33f6505ab..3a8b154b565 100644
1322+
index 2e33f6505ab..8fca1231d66 100644
13231323
--- a/sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala
13241324
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala
13251325
@@ -23,11 +23,13 @@ import org.apache.spark.SparkRuntimeException
@@ -1365,13 +1365,13 @@ index 2e33f6505ab..3a8b154b565 100644
13651365
}
13661366
assert(exchanges.size === 1)
13671367
}
1368-
@@ -2674,22 +2688,31 @@ class SubquerySuite extends QueryTest
1368+
@@ -2674,22 +2688,36 @@ class SubquerySuite extends QueryTest
13691369
}
13701370
}
13711371

13721372
- test("SPARK-43402: FileSourceScanExec supports push down data filter with scalar subquery") {
13731373
+ test("SPARK-43402: FileSourceScanExec supports push down data filter with scalar subquery",
1374-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3315")) {
1374+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4042")) {
13751375
def checkFileSourceScan(query: String, answer: Seq[Row]): Unit = {
13761376
val df = sql(query)
13771377
checkAnswer(df, answer)
@@ -1380,6 +1380,7 @@ index 2e33f6505ab..3a8b154b565 100644
13801380
+ val dataSourceScanExec = collect(df.queryExecution.executedPlan) {
13811381
+ case f: FileSourceScanLike => f
13821382
+ case c: CometScanExec => c
1383+
+ case n: CometNativeScanExec => n
13831384
}
13841385
sparkContext.listenerBus.waitUntilEmpty()
13851386
- assert(fileSourceScanExec.size === 1)
@@ -1396,6 +1397,10 @@ index 2e33f6505ab..3a8b154b565 100644
13961397
+ c.dataFilters.flatMap(_.collect {
13971398
+ case s: ScalarSubquery => s
13981399
+ })
1400+
+ case n: CometNativeScanExec =>
1401+
+ n.dataFilters.flatMap(_.collect {
1402+
+ case s: ScalarSubquery => s
1403+
+ })
13991404
+ }
14001405
assert(scalarSubquery.length === 1)
14011406
assert(scalarSubquery.head.plan.isInstanceOf[ReusedSubqueryExec])

0 commit comments

Comments
 (0)