MaxGekk commented on code in PR #43438:
URL: https://github.com/apache/spark/pull/43438#discussion_r1365605107
##########
common/utils/src/main/scala/org/apache/spark/SparkThrowableHelper.scala:
##########
@@ -51,9 +51,11 @@ private[spark] object SparkThrowableHelper {
messageParameters: Map[String, String],
context: String): String = {
val displayMessage = errorReader.getErrorMessage(errorClass,
messageParameters)
+ val sqlState = errorReader.getSqlState(errorClass)
+ val displaySqlState = if (sqlState == null) "" else s" SQLSTATE: $sqlState"
val displayQueryContext = (if (context.isEmpty) "" else "\n") + context
val prefix = if (errorClass.startsWith("_LEGACY_ERROR_")) "" else
s"[$errorClass] "
- s"$prefix$displayMessage$displayQueryContext"
+ s"$prefix$displayMessage$displaySqlState$displayQueryContext"
Review Comment:
@srielau Could you a few sentences to PR's description about reasons for
putting this at the end of error messages.
--
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]