andygrove commented on code in PR #340:
URL: https://github.com/apache/datafusion-spark/pull/340#discussion_r4595034795
##########
crates/sqllogictest/test_files/url/parse_url.slt:
##########
@@ -337,7 +337,7 @@ 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');
+SELECT parse_url('http://[::1/path', 'HOST');
Review Comment:
Thanks for picking this up, the single error message reads much better. I
checked the old URL against PySpark 4.2.0.
`parse_url('http://spark.apache.org:99999/path', 'HOST')` actually returns
`spark.apache.org` in Spark, with or without ANSI, because `java.net.URI`
doesn't range-check ports. `http://spark.apache.org:abc/path` returns NULL
there instead of raising. So switching the test to `[::1` is fine for checking
the message, but we lose the only coverage of the port difference. Could you
keep a case for `:99999` with Spark's expected value, commented out or marked
as a known difference, and open an issue that tracks the port handling? Then
link it here.
##########
crates/sqllogictest/test_files/url/parse_url.slt:
##########
@@ -360,8 +360,11 @@ set datafusion.execution.enable_ansi_mode = true;
query error DataFusion error: Execution error: The url is invalid: inva
lid://spark\.apache\.org/path\?query=1\. Use `try_parse_url` to tolerate
invalid URL and return NULL instead\. SQLSTATE: 22P02
SELECT parse_url('inva lid://spark.apache.org/path?query=1', 'QUERY');
-query error DataFusion error: Execution error: InvalidPort
-SELECT parse_url('http://spark.apache.org:99999/path', 'HOST');
+query error
+SELECT parse_url('http://[::1/path', 'HOST');
+----
+DataFusion error: Execution error: The url is invalid: http://[::1/path. Use
`try_parse_url` to tolerate invalid URL and return NULL instead. SQLSTATE: 22P02
+
Review Comment:
There are two blank lines after this block. Could you trim it to one so it
matches the rest of the file?
--
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]