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/12 12:01:13 UTC

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

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


##########
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:
   Here are all subclasses of DATATYPE_MISMATCH.
   Do we really need Level 3 error classes? @MaxGekk 
   
   If we keep Level 2 error classes, INVALID_NUMBER_FORMAT....
   The naming rule is inconsistent with other subclasses, eg:
   RANGE_FRAME_INVALID_TYPE, RANGE_FRAME_MULTI_ORDER, RANGE_FRAME_WITHOUT_ORDER...
   
   If we merge two flavors for SEPARATOR and CURRENCY, We have to put these characters into the message parameters, which seems inconvenient for subsequent internationalization.



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