diff --git a/spark/src/test/scala/org/apache/comet/CometCastSuite.scala b/spark/src/test/scala/org/apache/comet/CometCastSuite.scala index 7245f72842..46b43d59d9 100644 --- a/spark/src/test/scala/org/apache/comet/CometCastSuite.scala +++ b/spark/src/test/scala/org/apache/comet/CometCastSuite.scala @@ -26,7 +26,6 @@ import scala.jdk.CollectionConverters._ import scala.util.Random import org.apache.hadoop.fs.Path -import org.apache.spark.SparkConf import org.apache.spark.sql.{CometTestBase, DataFrame, Row, SaveMode} import org.apache.spark.sql.catalyst.expressions.Cast import org.apache.spark.sql.catalyst.parser.ParseException @@ -43,11 +42,6 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper { import testImplicits._ - // Casts in this suite predominantly test non-ANSI semantics (silent overflow/null on - // invalid input); tests that target ANSI behavior opt in explicitly via withSQLConf. - override protected def sparkConf: SparkConf = - super.sparkConf.set(SQLConf.ANSI_ENABLED.key, "false") - /** Create a data generator using a fixed seed so that tests are reproducible */ private val gen = DataGenerator.DEFAULT diff --git a/spark/src/test/scala/org/apache/comet/CometFuzzMathSuite.scala b/spark/src/test/scala/org/apache/comet/CometFuzzMathSuite.scala index 50a4425f97..2848bd23d9 100644 --- a/spark/src/test/scala/org/apache/comet/CometFuzzMathSuite.scala +++ b/spark/src/test/scala/org/apache/comet/CometFuzzMathSuite.scala @@ -19,18 +19,10 @@ package org.apache.comet -import org.apache.spark.SparkConf -import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types.{DecimalType, IntegerType, LongType} class CometFuzzMathSuite extends CometFuzzTestBase { - // The integer-math fuzz tests intentionally cover overflowing inputs; under Spark 4's - // default ANSI mode those would throw rather than produce a result for both Spark and - // Comet to compare against. Pin ANSI off so the parity comparison can run. - override protected def sparkConf: SparkConf = - super.sparkConf.set(SQLConf.ANSI_ENABLED.key, "false") - for (op <- Seq("+", "-", "*", "/", "div")) { test(s"integer math: $op") { val df = spark.read.parquet(filename) @@ -63,5 +55,4 @@ class CometFuzzMathSuite extends CometFuzzTestBase { checkSparkAnswerAndOperator(sql) } } - } diff --git a/spark/src/test/scala/org/apache/comet/exec/CometAggregateSuite.scala b/spark/src/test/scala/org/apache/comet/exec/CometAggregateSuite.scala index ae14c68207..23b3d43959 100644 --- a/spark/src/test/scala/org/apache/comet/exec/CometAggregateSuite.scala +++ b/spark/src/test/scala/org/apache/comet/exec/CometAggregateSuite.scala @@ -22,7 +22,6 @@ package org.apache.comet.exec import scala.util.Random import org.apache.hadoop.fs.Path -import org.apache.spark.SparkConf import org.apache.spark.sql.{CometTestBase, DataFrame, Row} import org.apache.spark.sql.catalyst.expressions.Cast import org.apache.spark.sql.catalyst.optimizer.EliminateSorts @@ -43,11 +42,6 @@ import org.apache.comet.testing.{DataGenOptions, FuzzDataGenerator, ParquetGener class CometAggregateSuite extends CometTestBase with AdaptiveSparkPlanHelper { import testImplicits._ - // Several aggregate tests exercise overflow behavior expected to wrap around silently; - // ANSI-mode variants opt in to ANSI explicitly via withSQLConf. - override protected def sparkConf: SparkConf = - super.sparkConf.set(SQLConf.ANSI_ENABLED.key, "false") - test("min/max floating point with negative zero") { val r = new Random(42) val schema = StructType(