itholic commented on code in PR #39137:
URL: https://github.com/apache/spark/pull/39137#discussion_r1057030425
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1046,6 +1046,63 @@
"Protobuf type not yet supported: <protobufType>."
]
},
+ "PYSPARK" : {
+ "message" : [
+ ""
+ ],
+ "subClass" : {
+ "COLUMN_IN_LIST" : {
+ "message" : [
+ "<funcName> does not allow a column in a list"
+ ]
+ },
+ "HIGHER_ORDER_FUNCTION_SHOULD_RETURN_COLUMN" : {
+ "message" : [
+ "Function `<funcName>` should return Column, got <returnType>"
+ ]
+ },
+ "NOT_A_COLUMN" : {
+ "message" : [
+ "Argument `<argName>` should be a column, got <argType>."
+ ]
+ },
+ "NOT_A_STRING" : {
+ "message" : [
+ "Argument `<argName>` should be a string, got <argType>."
+ ]
+ },
+ "NOT_COLUMN_OR_INTEGER" : {
+ "message" : [
+ "Argument `<argName>` should be a column or integer, got <argType>."
Review Comment:
Yeah, there is a framework on JVM side to handle this logic.
These parameters from `error-classes.json` is constructed from
`SparkThrowable` and `SparkThrowableHelper`.
And, all Exceptions should inherits the `SparkThrowable` for leveraging this
centralized error message framework.
You can check the
[Guidelines](https://github.com/apache/spark/tree/master/core/src/main/resources/error)
for more detail :-)
--
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]