MaxGekk commented on code in PR #40660:
URL: https://github.com/apache/spark/pull/40660#discussion_r1157051474
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1414,6 +1414,11 @@
"sortBy must be used together with bucketBy."
]
},
+ "SQL_CONF_NOT_FOUND" : {
+ "message" : [
+ "The SQL config \"<key>\" cannot be found. Please verify that the config
exists."
Review Comment:
Please, quote the config in the code and remove "" around the key:
```suggestion
"The SQL config <sqlConf> cannot be found. Please verify that the
config exists."
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2134,8 +2134,10 @@ private[sql] object QueryExecutionErrors extends
QueryErrorsBase {
cause = null)
}
- def noSuchElementExceptionError(key: String): Throwable = {
- new NoSuchElementException(key)
+ def sqlConfigNotFoundError(key: String): SparkRuntimeException = {
+ new SparkRuntimeException(
+ errorClass = "SQL_CONF_NOT_FOUND",
+ messageParameters = Map("key" -> key))
Review Comment:
Please, quote the config using `toSQLConf()`
--
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]