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/11/11 15:33:02 UTC

[GitHub] [spark] srielau commented on a diff in pull request #38531: [SPARK-40755][SQL] Migrate type check failures of number formatting onto error classes

srielau commented on code in PR #38531:
URL: https://github.com/apache/spark/pull/38531#discussion_r1020324789


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -290,6 +290,46 @@
           "Null typed values cannot be used as arguments of <functionName>."
         ]
       },
+      "NUMBER_FORMAT_CURRENCY_MUST_BEFORE_DECIMAL" : {
+        "message" : [
+          "Currency characters must appear before any decimal point in the number format: '<numberFormat>'"

Review Comment:
   Seems there is 5 (or 3) of these, how about using suberror classes here:
   INVALID_NUMBER_FORMAT.CURRENCY/EMPTY/SEPARATOR
   
   Or:
   INVALID_NUMBER_FORMAT_CURRENT
   ...
   
   Also I think the two flavors for SEPARATOR and CURRENCY each can be merged.
   
   Currency characters must appear before the decimal point and any digits in the number format
   
   



-- 
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