MaxGekk commented on code in PR #44464:
URL: https://github.com/apache/spark/pull/44464#discussion_r1438075440
##########
connector/connect/common/src/main/scala/org/apache/spark/sql/connect/client/GrpcExceptionConverter.scala:
##########
@@ -230,55 +230,75 @@ private[client] object GrpcExceptionConverter {
params.cause)),
errorConstructor(params =>
new NoSuchTableException(params.errorClass.orNull,
params.messageParameters, params.cause)),
- errorConstructor[NumberFormatException](params =>
+ errorConstructor(params =>
new SparkNumberFormatException(
- params.message,
- params.errorClass,
+ params.errorClass.orNull,
params.messageParameters,
params.queryContext)),
+ errorConstructor[NumberFormatException](params =>
Review Comment:
Before this PR, we converted Java exception to Spark exception at the client
side by passing the message as is (error class and message parameters was null
or empty) like: `NumberFormatException("invalid format 9hh99")` ->
`SparkNumberFormatException("invalid format 9hh99", errorClass = null)`.
After the changes, the conversion still exists but I put the original
message to a parameter:
`NumberFormatException("invalid format 9hh99")` ->
`SparkNumberFormatException(errorClass = "_LEGACY_ERROR_TEMP_3104",
messageParameters = Map("message" -> "invalid format 9hh99"))`
--
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]