Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions spark/src/test/scala/org/apache/comet/CometCastSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -63,5 +55,4 @@ class CometFuzzMathSuite extends CometFuzzTestBase {
checkSparkAnswerAndOperator(sql)
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down
Loading