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/05/13 15:54:07 UTC
[GitHub] [spark] MaxGekk commented on a diff in pull request #36336: [SPARK-38692][SQL] Use error classes in the compilation errors of function args
MaxGekk commented on code in PR #36336:
URL: https://github.com/apache/spark/pull/36336#discussion_r872551583
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -119,6 +119,33 @@
"message" : [ "The fraction of sec must be zero. Valid range is [0, 60]. If necessary set <config> to false to bypass this error. " ],
"sqlState" : "22023"
},
+ "INVALID_FUNCTION_ARGUMENTS" : {
Review Comment:
Would it be possible to use the existing error class `INVALID_PARAMETER_VALUE`?
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -119,6 +119,33 @@
"message" : [ "The fraction of sec must be zero. Valid range is [0, 60]. If necessary set <config> to false to bypass this error. " ],
"sqlState" : "22023"
},
+ "INVALID_FUNCTION_ARGUMENTS" : {
+ "message" : [ "The function arguments invalid: " ],
Review Comment:
As I can see, every sub-class repeats function name. I would propose to add the function name to the base class, like:
```json
"message" : [ "Arguments of the <funcName> function are invalid: " ],
```
--
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