You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/03/30 18:26:41 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #40609: [SPARK-42316][SQL] Assign name to _LEGACY_ERROR_TEMP_2044

MaxGekk commented on code in PR #40609:
URL: https://github.com/apache/spark/pull/40609#discussion_r1153634383


##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -625,6 +625,20 @@ class QueryExecutionErrorsSuite
     }
   }
 
+  test("BINARY_ARITHMETIC_CAUSE_OVERFLOW: byte plus byte result overflow") {
+    checkError(
+      exception = intercept[SparkArithmeticException] {
+        sql(s"select CAST('5' AS TINYINT) + CAST('5' AS TINYINT)").collect()
+      },
+      errorClass = "BINARY_ARITHMETIC_CAUSE_OVERFLOW",
+      parameters = Map(
+        "value1" -> "5",
+        "symbol" -> "+",
+        "value2" -> "5",
+      ),

Review Comment:
   Please, remove this comma:
   ```suggestion
           "value2" -> "5"),
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org