zzzzming95 commented on code in PR #37636:
URL: https://github.com/apache/spark/pull/37636#discussion_r955880202
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -332,6 +332,13 @@ private[sql] object QueryExecutionErrors extends
QueryErrorsBase {
s"If necessary set ${SQLConf.ANSI_ENABLED.key} to false to bypass this
error.", e)
}
+ def illegalUrlError(url: UTF8String, e: IllegalArgumentException):
+ Throwable with SparkThrowable = {
+ new SparkIllegalArgumentException(errorClass = "CANNOT_DECODE_URL",
+ messageParameters = Array(url.toString, e.getMessage)
Review Comment:
But sometimes, some Java exceptions information can help users locate the
specific problem. For example, the exception of
url_decode('http%3A%2F%2spark.apache.org') will indicate that the error is "2s".
> Illegal hex characters in escape (%) pattern - For input string: "2s"
This is beneficial for users to quickly locate, just like the parsing error
of sql parse, what do you think?
--
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]