You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/07 05:09:42 UTC
[GitHub] [spark] allisonwang-db commented on a change in pull request #31920: [SPARK-33604][SQL] Group exception messages in sql/execution
allisonwang-db commented on a change in pull request #31920:
URL: https://github.com/apache/spark/pull/31920#discussion_r608343436
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala
##########
@@ -303,4 +303,64 @@ object QueryParsingErrors {
new ParseException(s"Found duplicate keys '$key'.", ctx)
}
+ def formatForSetConfigurationUnExpectedError(ctx: SetConfigurationContext): Throwable = {
+ new ParseException(
+ s"""
+ |Expected format is 'SET', 'SET key', or 'SET key=value'. If you want to include
+ |special characters in key, or include semicolon in value, please use quotes,
+ |e.g., SET `ke y`=`v;alue`.
+ """.stripMargin.replaceAll("\n", " "), ctx)
+ }
+
+ def invalidPropertyKeyForSetQuotedConfigurationError(
+ keyCandidate: String, valueStr: String, ctx: SetQuotedConfigurationContext): Throwable = {
+ new ParseException(s"'$keyCandidate' is an invalid property key, please " +
+ s"use quotes, e.g. SET `$keyCandidate`=`$valueStr`", ctx)
+ }
+
+ def invalidPropertyValueForSetQuotedConfigurationError(
Review comment:
Sounds good. We can emphasize the property key/value should be quoted.
--
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.
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