ulysses-you commented on a change in pull request #30399:
URL: https://github.com/apache/spark/pull/30399#discussion_r525305022
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
##########
@@ -1404,7 +1404,10 @@ case class ParseUrl(children: Seq[Expression])
try {
new URI(url.toString)
} catch {
- case e: URISyntaxException => null
+ // We fail on error if in ansi mode.
+ case e: URISyntaxException if SQLConf.get.ansiEnabled =>
+ throw new IllegalArgumentException(s"Find an invaild url string
${url.toString}", e)
Review comment:
To clarify, the raw exception message is something like `Illegal
character in query at index 33: https://a.b.c/index.php?params1=a|b¶ms2=x`.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]