-- parse_url
SELECT parse_url('http://spark.apache.org/path?query=1', 'HOST');
+-----------------------------------------------------+
|parse_url(http://spark.apache.org/path?query=1, HOST)|
+-----------------------------------------------------+
|                                     spark.apache.org|
+-----------------------------------------------------+

SELECT parse_url('http://spark.apache.org/path?query=1', 'QUERY');
+------------------------------------------------------+
|parse_url(http://spark.apache.org/path?query=1, QUERY)|
+------------------------------------------------------+
|                                               query=1|
+------------------------------------------------------+

SELECT parse_url('http://spark.apache.org/path?query=1', 'QUERY', 'query');
+-------------------------------------------------------------+
|parse_url(http://spark.apache.org/path?query=1, QUERY, query)|
+-------------------------------------------------------------+
|                                                            1|
+-------------------------------------------------------------+

-- url_decode
SELECT url_decode('https%3A%2F%2Fspark.apache.org');
+------------------------------------------+
|url_decode(https%3A%2F%2Fspark.apache.org)|
+------------------------------------------+
|                      https://spark.apa...|
+------------------------------------------+

-- url_encode
SELECT url_encode('https://spark.apache.org');
+------------------------------------+
|url_encode(https://spark.apache.org)|
+------------------------------------+
|                https%3A%2F%2Fspa...|
+------------------------------------+