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 2020/11/17 16:34:24 UTC
[GitHub] [spark] ulysses-you commented on a change in pull request #30399: [SPARK-33468][SQL] ParseUrl should fail if input string is not a valid url
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org