MaxGekk commented on code in PR #36169:
URL: https://github.com/apache/spark/pull/36169#discussion_r849091336
##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala:
##########
@@ -278,4 +281,14 @@ class QueryExecutionErrorsSuite extends QueryTest
assert(e.getMessage ===
"Datetime operation overflow: add 1000000 YEAR to TIMESTAMP '2022-03-09
01:02:03'.")
}
+
+ test("CANNOT_PARSE_DECIMAL: unparseable decimal") {
+ val e = intercept[SparkIllegalStateException] {
+ val decimalParser = ExprUtils.getDecimalParser(Locale.ROOT)
+ decimalParser("$92,807.99")
Review Comment:
Could you raise the exception from user space (not using internal methods),
please. We assign error classes not for user visible errors, just in case.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]