MaxGekk commented on code in PR #43412:
URL: https://github.com/apache/spark/pull/43412#discussion_r1363764577
##########
core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala:
##########
@@ -116,6 +116,17 @@ class SparkThrowableSuite extends SparkFunSuite {
}
}
+ test("SQLSTATE is mandatory") {
+ val errorClassesNoSqlState = errorReader.errorInfoMap.filter {
+ case (error: String, info: ErrorInfo) =>
+ !error.startsWith("_LEGACY_ERROR_TEMP") && info.sqlState.isEmpty
+ }.keys.toSeq
+ if (errorClassesNoSqlState.nonEmpty) {
+ logWarning(s"Error classes without SQLSTATE:
${errorClassesNoSqlState.mkString(", ")}")
Review Comment:
Could you put the warning as a parameter to the assert below.
##########
common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala:
##########
@@ -130,7 +130,7 @@ private object ErrorClassesJsonReader {
*
* @param sqlState SQLSTATE associated with this class.
* @param subClass SubClass associated with this class.
- * @param message C-style message format compatible with printf.
+ * @param message Message format with optional tags (e.g. <parm>).
Review Comment:
Not sure that `tags` is the clear term here. Maybe `named placeholders`?
--
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]