-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-43028][SQL] Add error class SQL_CONF_NOT_FOUND #40660
[SPARK-43028][SQL] Add error class SQL_CONF_NOT_FOUND #40660
Conversation
@@ -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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, quote the config in the code and remove "" around the key:
"The SQL config \"<key>\" cannot be found. Please verify that the config exists." | |
"The SQL config <sqlConf> cannot be found. Please verify that the config exists." |
def sqlConfigNotFoundError(key: String): SparkRuntimeException = { | ||
new SparkRuntimeException( | ||
errorClass = "SQL_CONF_NOT_FOUND", | ||
messageParameters = Map("key" -> key)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, quote the config using toSQLConf()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for CI.
cc @srielau |
@allisonwang-db Could you fix the R test:
|
+1, LGTM. Merging to master. |
What changes were proposed in this pull request?
This PR adds a new error class
SQL_CONF_NOT_FOUND
.Why are the changes needed?
To make the error message more user-friendly when getting a non-existing SQL config. For example:
Before this PR, it will throw this error:
After this PR:
Does this PR introduce any user-facing change?
Yes. The error message will be changed.
How was this patch tested?
Added a new UT.