@@ -193,6 +193,19 @@ index 41fd4de2a09..44cd244d3b0 100644
193193 -- Test aggregate operator with codegen on and off.
194194 --CONFIG_DIM1 spark.sql.codegen.wholeStage=true
195195 --CONFIG_DIM1 spark.sql.codegen.wholeStage=false,spark.sql.codegen.factoryMode=CODEGEN_ONLY
196+ diff --git a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
197+ index 3a409eea348..38fed024c98 100644
198+ --- a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
199+ +++ b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int4.sql
200+ @@ -69,6 +69,8 @@ SELECT '' AS one, i.* FROM INT4_TBL i WHERE (i.f1 % smallint('2')) = smallint('1
201+ -- any evens
202+ SELECT '' AS three, i.* FROM INT4_TBL i WHERE (i.f1 % int('2')) = smallint('0');
203+
204+ + -- https://github.com/apache/datafusion-comet/issues/2215
205+ + --SET spark.comet.exec.enabled=false
206+ -- [SPARK-28024] Incorrect value when out of range
207+ SELECT '' AS five, i.f1, i.f1 * smallint('2') AS x FROM INT4_TBL i;
208+
196209diff --git a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int8.sql b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int8.sql
197210index fac23b4a26f..2b73732c33f 100644
198211--- a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/int8.sql
@@ -881,7 +894,7 @@ index b5b34922694..a72403780c4 100644
881894 protected val baseResourcePath = {
882895 // use the same way as `SQLQueryTestSuite` to get the resource path
883896diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
884- index 525d97e4998..5e04319dd97 100644
897+ index 525d97e4998..843f0472c23 100644
885898--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
886899+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
887900@@ -1508,7 +1508,8 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
@@ -894,7 +907,27 @@ index 525d97e4998..5e04319dd97 100644
894907 AccumulatorSuite.verifyPeakExecutionMemorySet(sparkContext, "external sort") {
895908 sql("SELECT * FROM testData2 ORDER BY a ASC, b ASC").collect()
896909 }
897- @@ -4467,7 +4468,11 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
910+ @@ -4429,7 +4430,8 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
911+ }
912+
913+ test("SPARK-39166: Query context of binary arithmetic should be serialized to executors" +
914+ - " when WSCG is off") {
915+ + " when WSCG is off",
916+ + IgnoreComet("https://github.com/apache/datafusion-comet/issues/2215")) {
917+ withSQLConf(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key -> "false",
918+ SQLConf.ANSI_ENABLED.key -> "true") {
919+ withTable("t") {
920+ @@ -4450,7 +4452,8 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
921+ }
922+
923+ test("SPARK-39175: Query context of Cast should be serialized to executors" +
924+ - " when WSCG is off") {
925+ + " when WSCG is off",
926+ + IgnoreComet("https://github.com/apache/datafusion-comet/issues/2215")) {
927+ withSQLConf(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key -> "false",
928+ SQLConf.ANSI_ENABLED.key -> "true") {
929+ withTable("t") {
930+ @@ -4467,14 +4470,19 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
898931 val msg = intercept[SparkException] {
899932 sql(query).collect()
900933 }.getMessage
@@ -907,6 +940,15 @@ index 525d97e4998..5e04319dd97 100644
907940 }
908941 }
909942 }
943+ }
944+
945+ test("SPARK-39190,SPARK-39208,SPARK-39210: Query context of decimal overflow error should " +
946+ - "be serialized to executors when WSCG is off") {
947+ + "be serialized to executors when WSCG is off",
948+ + IgnoreComet("https://github.com/apache/datafusion-comet/issues/2215")) {
949+ withSQLConf(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key -> "false",
950+ SQLConf.ANSI_ENABLED.key -> "true") {
951+ withTable("t") {
910952diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
911953index 48ad10992c5..51d1ee65422 100644
912954--- a/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
0 commit comments