@@ -312,7 +312,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
312312 makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled = dictionaryEnabled, 10000 )
313313 withParquetTable(path.toString, " tbl" ) {
314314 val (sparkErr, cometErr) =
315- checkSparkMaybeThrows (sql(s " SELECT _20 + ${Int .MaxValue } FROM tbl " ))
315+ checkSparkAnswerMaybeThrows (sql(s " SELECT _20 + ${Int .MaxValue } FROM tbl " ))
316316 if (isSpark40Plus) {
317317 assert(sparkErr.get.getMessage.contains(" EXPRESSION_DECODING_FAILED" ))
318318 } else {
@@ -359,7 +359,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
359359 makeParquetFileAllPrimitiveTypes(path, dictionaryEnabled = dictionaryEnabled, 10000 )
360360 withParquetTable(path.toString, " tbl" ) {
361361 val (sparkErr, cometErr) =
362- checkSparkMaybeThrows (sql(s " SELECT _20 - ${Int .MaxValue } FROM tbl " ))
362+ checkSparkAnswerMaybeThrows (sql(s " SELECT _20 - ${Int .MaxValue } FROM tbl " ))
363363 if (isSpark40Plus) {
364364 assert(sparkErr.get.getMessage.contains(" EXPRESSION_DECODING_FAILED" ))
365365 assert(cometErr.get.getMessage.contains(" EXPRESSION_DECODING_FAILED" ))
@@ -2022,7 +2022,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
20222022 val expectedDivideByZeroError =
20232023 " [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead."
20242024
2025- checkSparkMaybeThrows (sql(query)) match {
2025+ checkSparkAnswerMaybeThrows (sql(query)) match {
20262026 case (Some (sparkException), Some (cometException)) =>
20272027 assert(sparkException.getMessage.contains(expectedDivideByZeroError))
20282028 assert(cometException.getMessage.contains(expectedDivideByZeroError))
@@ -2174,7 +2174,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
21742174 }
21752175
21762176 def checkOverflow (query : String , dtype : String ): Unit = {
2177- checkSparkMaybeThrows (sql(query)) match {
2177+ checkSparkAnswerMaybeThrows (sql(query)) match {
21782178 case (Some (sparkException), Some (cometException)) =>
21792179 assert(sparkException.getMessage.contains(dtype + " overflow" ))
21802180 assert(cometException.getMessage.contains(dtype + " overflow" ))
@@ -2700,7 +2700,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
27002700
27012701 test(" ListExtract" ) {
27022702 def assertBothThrow (df : DataFrame ): Unit = {
2703- checkSparkMaybeThrows (df) match {
2703+ checkSparkAnswerMaybeThrows (df) match {
27042704 case (Some (_), Some (_)) => ()
27052705 case (spark, comet) =>
27062706 fail(
@@ -2850,7 +2850,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
28502850 | from tbl
28512851 | """ .stripMargin)
28522852
2853- checkSparkMaybeThrows (res) match {
2853+ checkSparkAnswerMaybeThrows (res) match {
28542854 case (Some (sparkExc), Some (cometExc)) =>
28552855 assert(cometExc.getMessage.contains(ARITHMETIC_OVERFLOW_EXCEPTION_MSG ))
28562856 assert(sparkExc.getMessage.contains(" overflow" ))
@@ -2869,7 +2869,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
28692869 | _1 - _2
28702870 | from tbl
28712871 | """ .stripMargin)
2872- checkSparkMaybeThrows (res) match {
2872+ checkSparkAnswerMaybeThrows (res) match {
28732873 case (Some (sparkExc), Some (cometExc)) =>
28742874 assert(cometExc.getMessage.contains(ARITHMETIC_OVERFLOW_EXCEPTION_MSG ))
28752875 assert(sparkExc.getMessage.contains(" overflow" ))
@@ -2889,7 +2889,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
28892889 | from tbl
28902890 | """ .stripMargin)
28912891
2892- checkSparkMaybeThrows (res) match {
2892+ checkSparkAnswerMaybeThrows (res) match {
28932893 case (Some (sparkExc), Some (cometExc)) =>
28942894 assert(cometExc.getMessage.contains(ARITHMETIC_OVERFLOW_EXCEPTION_MSG ))
28952895 assert(sparkExc.getMessage.contains(" overflow" ))
@@ -2909,7 +2909,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
29092909 | from tbl
29102910 | """ .stripMargin)
29112911
2912- checkSparkMaybeThrows (res) match {
2912+ checkSparkAnswerMaybeThrows (res) match {
29132913 case (Some (sparkExc), Some (cometExc)) =>
29142914 assert(cometExc.getMessage.contains(DIVIDE_BY_ZERO_EXCEPTION_MSG ))
29152915 assert(sparkExc.getMessage.contains(" Division by zero" ))
@@ -2929,7 +2929,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
29292929 | from tbl
29302930 | """ .stripMargin)
29312931
2932- checkSparkMaybeThrows (res) match {
2932+ checkSparkAnswerMaybeThrows (res) match {
29332933 case (Some (sparkExc), Some (cometExc)) =>
29342934 assert(cometExc.getMessage.contains(DIVIDE_BY_ZERO_EXCEPTION_MSG ))
29352935 assert(sparkExc.getMessage.contains(" Division by zero" ))
@@ -2950,7 +2950,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
29502950 | from tbl
29512951 | """ .stripMargin)
29522952
2953- checkSparkMaybeThrows (res) match {
2953+ checkSparkAnswerMaybeThrows (res) match {
29542954 case (Some (sparkException), Some (cometException)) =>
29552955 assert(sparkException.getMessage.contains(DIVIDE_BY_ZERO_EXCEPTION_MSG ))
29562956 assert(cometException.getMessage.contains(DIVIDE_BY_ZERO_EXCEPTION_MSG ))
@@ -2985,7 +2985,7 @@ class CometExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelper {
29852985 Seq (true , false ).foreach { ansi =>
29862986 withSQLConf(SQLConf .ANSI_ENABLED .key -> ansi.toString) {
29872987 val res = spark.sql(s " SELECT round(_1, $scale) from tbl " )
2988- checkSparkMaybeThrows (res) match {
2988+ checkSparkAnswerMaybeThrows (res) match {
29892989 case (Some (sparkException), Some (cometException)) =>
29902990 assert(sparkException.getMessage.contains(" ARITHMETIC_OVERFLOW" ))
29912991 assert(cometException.getMessage.contains(" ARITHMETIC_OVERFLOW" ))
0 commit comments