Skip to content

Commit 4ba0bcf

Browse files
parthchandraclaude
andcommitted
fix: disable ANSI mode in benchmarks to avoid exceptions on invalid input
comet-test-apache-spark defaults spark.sql.ansi.enabled to true, causing CAST on intentionally invalid benchmark data to throw instead of returning NULL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e444b6f commit 4ba0bcf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

spark/src/test/scala/org/apache/spark/sql/benchmark/CometBenchmarkBase.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ trait CometBenchmarkBase
6363
sparkSession.conf.set(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key, "true")
6464
sparkSession.conf.set(CometConf.COMET_ENABLED.key, "false")
6565
sparkSession.conf.set(CometConf.COMET_EXEC_ENABLED.key, "false")
66+
// Benchmarks use invalid input values that should produce NULL, not exceptions
67+
sparkSession.conf.set(SQLConf.ANSI_ENABLED.key, "false")
6668

6769
sparkSession
6870
}

0 commit comments

Comments
 (0)