You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2024/07/30 05:54:30 UTC
[PR] [SPARK-49056][SQL] ErrorClassesJsonReader cannot handle null properly [spark]
itholic opened a new pull request, #47531:
URL: https://github.com/apache/spark/pull/47531
### What changes were proposed in this pull request?
This PR proposes to make `ErrorClassesJsonReader` handle null properly
### Why are the changes needed?
When `ErrorClassesJsonReader` takes null for `getErrorMessage` method, it cannot handle so raises `INTERNAL_ERROR`.
For example, given error class example below:
```json
{
"MISSING_PARAMETER" : {
"message" : [
"Parameter ${param} is missing."
]
}
}
```
and run:
```scala
getErrorMessage("MISSING_PARAMETER", Map("param" -> null)
```
**Before**
```
[INTERNAL_ERROR] Undefined error message parameter for error class: 'MISSING_PARAMETER', MessageTemplate: Parameter ${param} is missing., Parameters: Map(param -> null) SQLSTATE: XX000
org.apache.spark.SparkException: [INTERNAL_ERROR] Undefined error message parameter for error class: 'MISSING_PARAMETER', MessageTemplate: Parameter ${param} is missing., Parameters: Map(param -> null) SQLSTATE: XX000
```
**After**
```
[MISSING_PARAMETER] Parameter null is missing.
```
### Does this PR introduce _any_ user-facing change?
No API changes, but this PR improves the user-facing error message as described above.
### How was this patch tested?
Added UT.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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
Re: [PR] [SPARK-49056][SQL] ErrorClassesJsonReader cannot handle null properly [spark]
Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #47531:
URL: https://github.com/apache/spark/pull/47531#issuecomment-2259705426
Thanks! Merged into master
--
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
Re: [PR] [SPARK-49056][SQL] ErrorClassesJsonReader cannot handle null properly [spark]
Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic closed pull request #47531: [SPARK-49056][SQL] ErrorClassesJsonReader cannot handle null properly
URL: https://github.com/apache/spark/pull/47531
--
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
Re: [PR] [SPARK-49056][SQL] ErrorClassesJsonReader cannot handle null properly [spark]
Posted by "itholic (via GitHub)" <gi...@apache.org>.
itholic commented on PR #47531:
URL: https://github.com/apache/spark/pull/47531#issuecomment-2257523738
cc @MaxGekk @cloud-fan fyi
--
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