Skip to content

Commit 497015c

Browse files
committed
add parameter
1 parent 2202ca4 commit 497015c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ object ParseUrl {
13571357
1
13581358
""",
13591359
since = "2.0.0")
1360-
case class ParseUrl(children: Seq[Expression])
1360+
case class ParseUrl(children: Seq[Expression], failOnError: Boolean = SQLConf.get.ansiEnabled)
13611361
extends Expression with ExpectsInputTypes with CodegenFallback {
13621362

13631363
override def nullable: Boolean = true
@@ -1404,7 +1404,7 @@ case class ParseUrl(children: Seq[Expression])
14041404
try {
14051405
new URI(url.toString)
14061406
} catch {
1407-
case e: URISyntaxException if SQLConf.get.ansiEnabled =>
1407+
case e: URISyntaxException if failOnError =>
14081408
throw new IllegalArgumentException(s"Find an invaild url string ${url.toString}", e)
14091409
case _: URISyntaxException => null
14101410
}

0 commit comments

Comments
 (0)