-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-33468][SQL] ParseUrl in ANSI mode should fail if input string is not a valid url #30399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
62bf87f
5aec76a
a408734
2202ca4
497015c
ecd2143
d7e437b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1404,7 +1404,9 @@ case class ParseUrl(children: Seq[Expression]) | |
| try { | ||
| new URI(url.toString) | ||
| } catch { | ||
| case e: URISyntaxException => null | ||
| case e: URISyntaxException if SQLConf.get.ansiEnabled => | ||
|
||
| throw new IllegalArgumentException(s"Find an invaild url string ${url.toString}", e) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify, the raw exception message is something like |
||
| case _: URISyntaxException => null | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
input string->an input stringThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry missed here. Updated !