File tree Expand file tree Collapse file tree
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments