@@ -395,7 +395,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
395395 }
396396
397397 test(" ANSI support for add" ) {
398- assume(isSpark35Plus )
398+ assume(isSpark40Plus )
399399 val data = Seq ((Integer .MAX_VALUE , 1 ), (Integer .MIN_VALUE , - 1 ))
400400 withSQLConf(SQLConf .ANSI_ENABLED .key -> " true" ) {
401401 withParquetTable(data, " tbl" ) {
@@ -419,8 +419,9 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
419419 }
420420
421421 test(" ANSI support for subtract" ) {
422+ assume(isSpark40Plus)
422423 val data = Seq ((Integer .MIN_VALUE , 1 ))
423- withSQLConf(SQLConf .ANSI_ENABLED .key -> " true" , " spark.comet.ansi.enabled " -> " true " ) {
424+ withSQLConf(SQLConf .ANSI_ENABLED .key -> " true" ) {
424425 withParquetTable(data, " tbl" ) {
425426 val res = spark.sql("""
426427 |SELECT
@@ -440,6 +441,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
440441 }
441442
442443 test(" ANSI support for multiply" ) {
444+ assume(isSpark40Plus)
443445 val data = Seq ((Integer .MAX_VALUE , 10 ))
444446 withSQLConf(SQLConf .ANSI_ENABLED .key -> " true" ) {
445447 withParquetTable(data, " tbl" ) {
@@ -462,10 +464,10 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
462464 }
463465
464466 test(" ANSI support for divide" ) {
467+ assume(isSpark40Plus)
465468 val data = Seq ((Integer .MIN_VALUE , 0 ))
466469 withSQLConf(
467- SQLConf .ANSI_ENABLED .key -> " true" ,
468- " spark.comet.explainFallback.enabled" -> " true" ) {
470+ SQLConf .ANSI_ENABLED .key -> " true" ) {
469471 withParquetTable(data, " tbl" ) {
470472 val res = spark.sql("""
471473 |SELECT
@@ -1961,7 +1963,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
19611963 Seq (
19621964 (
19631965 s " SELECT cast(make_interval(c0, c1, c0, c1, c0, c0, c2) as string) as C from $table" ,
1964- Set (" make_interval is not supported" )),
1966+ Set (" Cast from CalendarIntervalType to StringType is not supported" )),
19651967 (
19661968 " SELECT "
19671969 + " date_part('YEAR', make_interval(c0, c1, c0, c1, c0, c0, c2))"
@@ -1980,8 +1982,8 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
19801982 + s " (SELECT c1, cast(make_interval(c0, c1, c0, c1, c0, c0, c2) as string) as casted from $table) as B "
19811983 + " where A.c1 = B.c1 " ,
19821984 Set (
1983- " Comet shuffle is not enabled: spark.comet.exec.shuffle.enabled is not enabled " ,
1984- " make_interval is not supported " )),
1985+ " Cast from CalendarIntervalType to StringType is not supported " ,
1986+ " Comet shuffle is not enabled: spark.comet.exec.shuffle.enabled is not enabled " )),
19851987 (s " select * from $table LIMIT 10 OFFSET 3 " , Set (" Comet shuffle is not enabled" )))
19861988 .foreach(test => {
19871989 val qry = test._1
0 commit comments