TechWizard9999 commented on code in PR #27158:
URL: https://github.com/apache/datafusion/pull/27158#discussion_r4537125979
##########
datafusion/sqllogictest/test_files/spark/url/parse_url.slt:
##########
@@ -330,9 +330,30 @@ NULL
statement error 'parse_url' does not support zero arguments
SELECT parse_url();
+# A malformed URL returns NULL when ANSI mode is off (the default)
+query T
+SELECT parse_url('inva lid://spark.apache.org/path?query=1', 'QUERY');
Review Comment:
Done
##########
datafusion/sqllogictest/test_files/spark/url/parse_url.slt:
##########
@@ -330,9 +330,30 @@ NULL
statement error 'parse_url' does not support zero arguments
SELECT parse_url();
+# A malformed URL returns NULL when ANSI mode is off (the default)
+query T
+SELECT parse_url('inva lid://spark.apache.org/path?query=1', 'QUERY');
+----
+NULL
+
+query T
+SELECT parse_url('http://spark.apache.org:99999/path', 'HOST');
+----
+NULL
+
+# A malformed URL raises an error when ANSI mode is on
+statement ok
+set datafusion.execution.enable_ansi_mode = true;
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]