Skip to content

Commit bf7af45

Browse files
committed
add tests
1 parent 7b47e29 commit bf7af45

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

spark/src/test/resources/sql-tests/expressions/url/parse_url_ansi.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ SELECT parse_url('https://user:pass@host:8080/p?k=v#ref', 'REF')
4141
-- NULL inputs still return NULL in ANSI mode
4242
query
4343
SELECT parse_url(NULL, 'HOST')
44+
45+
-- invalid URL throws in ANSI mode (native returns NULL instead of throwing)
46+
query ignore(known divergence: native parse_url does not throw INVALID_URL for malformed URLs)
47+
SELECT parse_url('not a url at all', 'HOST')
48+
49+
query ignore(known divergence: native parse_url does not throw INVALID_URL for malformed URLs)
50+
SELECT parse_url('://missing-scheme', 'HOST')
51+
52+
query ignore(known divergence: native parse_url does not throw INVALID_URL for malformed URLs)
53+
SELECT parse_url('', 'HOST')

0 commit comments

Comments
 (0)