Skip to content

Commit ae855f7

Browse files
andygroveclaude
andcommitted
Add IgnoreCometSuite to WholeStageCodegenSuite in 4.0.1.diff
Skip WholeStageCodegenSuite tests when Comet is enabled, matching the behavior in Spark 3.5. This fixes test failures like "Sort should be included in WholeStageCodegen" when native C2R is enabled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 018cfc2 commit ae855f7

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

dev/diffs/4.0.1.diff

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,17 +1842,30 @@ index aed11badb71..1a365b5aacf 100644
18421842
spark.range(1).foreach { _ =>
18431843
columnarToRowExec.canonicalized
18441844
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala
1845-
index a3cfdc5a240..1b08a1f42ee 100644
1845+
index a3cfdc5a240..3793b6191bf 100644
18461846
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala
18471847
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala
1848-
@@ -22,6 +22,7 @@ import org.apache.spark.rdd.MapPartitionsWithEvaluatorRDD
1849-
import org.apache.spark.sql.{Dataset, QueryTest, Row, SaveMode}
1848+
@@ -19,9 +19,10 @@ package org.apache.spark.sql.execution
1849+
1850+
import org.apache.spark.SparkException
1851+
import org.apache.spark.rdd.MapPartitionsWithEvaluatorRDD
1852+
-import org.apache.spark.sql.{Dataset, QueryTest, Row, SaveMode}
1853+
+import org.apache.spark.sql.{Dataset, IgnoreCometSuite, QueryTest, Row, SaveMode}
18501854
import org.apache.spark.sql.catalyst.expressions.CodegenObjectFactoryMode
18511855
import org.apache.spark.sql.catalyst.expressions.codegen.{ByteCodeStats, CodeAndComment, CodeGenerator}
18521856
+import org.apache.spark.sql.comet.{CometColumnarToRowExec, CometHashJoinExec, CometSortExec, CometSortMergeJoinExec}
18531857
import org.apache.spark.sql.execution.adaptive.DisableAdaptiveExecutionSuite
18541858
import org.apache.spark.sql.execution.aggregate.{HashAggregateExec, SortAggregateExec}
18551859
import org.apache.spark.sql.execution.columnar.InMemoryTableScanExec
1860+
@@ -33,7 +34,7 @@ import org.apache.spark.sql.types.{IntegerType, StringType, StructType}
1861+
1862+
// Disable AQE because the WholeStageCodegenExec is added when running QueryStageExec
1863+
class WholeStageCodegenSuite extends QueryTest with SharedSparkSession
1864+
- with DisableAdaptiveExecutionSuite {
1865+
+ with DisableAdaptiveExecutionSuite with IgnoreCometSuite {
1866+
1867+
import testImplicits._
1868+
18561869
@@ -172,6 +173,7 @@ class WholeStageCodegenSuite extends QueryTest with SharedSparkSession
18571870
val oneJoinDF = df1.join(df2.hint("SHUFFLE_HASH"), $"k1" === $"k2")
18581871
assert(oneJoinDF.queryExecution.executedPlan.collect {

0 commit comments

Comments
 (0)