You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/23 16:56:29 UTC
[GitHub] [spark] gengliangwang commented on a diff in pull request #37620: [SPARK-40183][SQL] Use error class NUMERIC_VALUE_OUT_OF_RANGE for overflow in decimal conversion
gengliangwang commented on code in PR #37620:
URL: https://github.com/apache/spark/pull/37620#discussion_r952889444
##########
sql/core/src/test/resources/sql-tests/results/cast.sql.out:
##########
@@ -866,10 +866,10 @@ struct<>
-- !query output
org.apache.spark.SparkArithmeticException
{
- "errorClass" : "CANNOT_CHANGE_DECIMAL_PRECISION",
+ "errorClass" : "NUMERIC_VALUE_OUT_OF_RANGE",
"sqlState" : "22005",
"messageParameters" : {
- "value" : "Decimal(compact, 10, 18, 6)",
+ "value" : "0.000010",
Review Comment:
That's something we need to fix. There are two methods in Decimal: `changePrecision` will change the internal value in place, while `toPrecision` copies a new instance and check whether the new instance can be changed.
It is not related to this PR though.
--
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