You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""org.apache.comet.CometNativeException: [ARITHMETIC_OVERFLOW] Integer/Float overflow. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error."""
@@ -408,9 +410,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
408
410
409
411
checkSparkMaybeThrows(res) match {
410
412
case (Some(sparkExc), Some(cometExc)) =>
411
-
valcometErrorPattern=
412
-
"""org.apache.spark.SparkArithmeticException: [ARITHMETIC_OVERFLOW] integer overflow. Use 'try_add' to tolerate overflow and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error"""
@@ -419,7 +419,6 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
419
419
}
420
420
421
421
test("ANSI support for subtract") {
422
-
assume(isSpark40Plus)
423
422
valdata=Seq((Integer.MIN_VALUE, 1))
424
423
withSQLConf(SQLConf.ANSI_ENABLED.key ->"true") {
425
424
withParquetTable(data, "tbl") {
@@ -430,9 +429,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
430
429
| """.stripMargin)
431
430
checkSparkMaybeThrows(res) match {
432
431
case (Some(sparkExc), Some(cometExc)) =>
433
-
valcometErrorPattern=
434
-
"""org.apache.spark.SparkArithmeticException: [ARITHMETIC_OVERFLOW] integer overflow. Use 'try_subtract' to tolerate overflow and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error."""
@@ -441,7 +438,6 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
441
438
}
442
439
443
440
test("ANSI support for multiply") {
444
-
assume(isSpark40Plus)
445
441
valdata=Seq((Integer.MAX_VALUE, 10))
446
442
withSQLConf(SQLConf.ANSI_ENABLED.key ->"true") {
447
443
withParquetTable(data, "tbl") {
@@ -453,9 +449,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
453
449
454
450
checkSparkMaybeThrows(res) match {
455
451
case (Some(sparkExc), Some(cometExc)) =>
456
-
valcometErrorPattern=
457
-
"""org.apache.spark.SparkArithmeticException: [ARITHMETIC_OVERFLOW] integer overflow. Use 'try_multiply' to tolerate overflow and return NULL instead. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error"""
@@ -464,7 +458,6 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
464
458
}
465
459
466
460
test("ANSI support for divide") {
467
-
assume(isSpark40Plus)
468
461
valdata=Seq((Integer.MIN_VALUE, 0))
469
462
withSQLConf(SQLConf.ANSI_ENABLED.key ->"true") {
470
463
withParquetTable(data, "tbl") {
@@ -473,10 +466,11 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
473
466
| _1 / _2
474
467
| from tbl
475
468
| """.stripMargin)
469
+
476
470
checkSparkMaybeThrows(res) match {
477
471
case (Some(sparkExc), Some(cometExc)) =>
478
472
valcometErrorPattern=
479
-
"""org.apache.spark.SparkArithmeticException: [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead"""
473
+
"""org.apache.comet.CometNativeException: [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead"""
0 commit comments