Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3230,7 +3230,7 @@
},
"INVALID_URL" : {
"message" : [
"The url is invalid: <url>. If necessary set <ansiConfig> to \"false\" to bypass this error."
"The url is invalid: <url>. Use `try_parse_url` to tolerate invalid URL and return NULL instead."
],
"sqlState" : "22P02"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE
def invalidUrlError(url: UTF8String, e: URISyntaxException): SparkIllegalArgumentException = {
new SparkIllegalArgumentException(
errorClass = "INVALID_URL",
messageParameters = Map(
"url" -> url.toString,
"ansiConfig" -> toSQLConf(SQLConf.ANSI_ENABLED.key)),
messageParameters = Map("url" -> url.toString),
cause = e)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.apache.spark.sql

import org.apache.spark.SparkIllegalArgumentException
import org.apache.spark.sql.catalyst.util.TypeUtils.toSQLConf
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.test.SharedSparkSession

Expand Down Expand Up @@ -77,10 +76,7 @@ class UrlFunctionsSuite extends QueryTest with SharedSparkSession {
sql(s"SELECT parse_url('$url', 'HOST')").collect()
},
condition = "INVALID_URL",
parameters = Map(
"url" -> url,
"ansiConfig" -> toSQLConf(SQLConf.ANSI_ENABLED.key)
))
parameters = Map("url" -> url))
}
}

Expand Down