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
Copy file name to clipboardExpand all lines: spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
58
58
valARITHMETIC_OVERFLOW_EXCEPTION_MSG=
59
59
"""org.apache.comet.CometNativeException: [ARITHMETIC_OVERFLOW] integer overflow. If necessary set "spark.sql.ansi.enabled" to "false" to bypass this error"""
60
60
valDIVIDE_BY_ZERO_EXCEPTION_MSG=
61
-
"""org.apache.comet.CometNativeException: [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead"""
61
+
"""Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead"""
62
62
63
63
test("compare true/false to negative zero") {
64
64
Seq(false, true).foreach { dictionary =>
@@ -2929,7 +2929,6 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
2929
2929
}
2930
2930
2931
2931
test("ANSI support for divide (division by zero)") {
2932
-
// TODO : Support ANSI mode in Integral divide -
2933
2932
valdata=Seq((Integer.MIN_VALUE, 0))
2934
2933
withSQLConf(SQLConf.ANSI_ENABLED.key ->"true") {
2935
2934
withParquetTable(data, "tbl") {
@@ -2950,7 +2949,6 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
2950
2949
}
2951
2950
2952
2951
test("ANSI support for divide (division by zero) float division") {
2953
-
// TODO : Support ANSI mode in Integral divide -
2954
2952
valdata=Seq((Float.MinPositiveValue, 0.0))
2955
2953
withSQLConf(SQLConf.ANSI_ENABLED.key ->"true") {
2956
2954
withParquetTable(data, "tbl") {
@@ -2970,6 +2968,26 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
2970
2968
}
2971
2969
}
2972
2970
2971
+
test("ANSI support for integral divide (division by zero)") {
0 commit comments