andygrove commented on code in PR #340:
URL: https://github.com/apache/datafusion-spark/pull/340#discussion_r4628749571


##########
crates/sqllogictest/test_files/url/parse_url.slt:
##########
@@ -337,10 +337,17 @@ 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');
 ----
 NULL
 
+# Known difference from Spark: java.net.URI doesn't range-check the port, so

Review Comment:
   Thanks for linking #365 and merging `main`. One thing went missing in the 
merge though. `main` now has a `# xfail spark:` comment mechanism (#368), and 
it already had live `:99999` records marked that way, one with ANSI off and one 
with ANSI on. The resolution here dropped both and kept the commented-out 
block. That means we no longer test the port case at all, including the new 
`The url is invalid` message for it, and the PySpark runner can't tell us when 
#365 gets fixed.
   
   Could you restore them as live records with the markers, and drop the 
commented block? Something like this after the `[::1` record with ANSI off:
   
   ```
   # xfail spark: Spark does not range-check the port, so it returns the host 
for a port above 65535 (https://github.com/apache/datafusion-spark/issues/365)
   query T
   SELECT parse_url('http://spark.apache.org:99999/path', 'HOST');
   ----
   NULL
   ```
   
   And with ANSI on, before the `try_parse_url` record:
   
   ```
   # xfail spark: Spark does not range-check the port, so it returns the host 
for a port above 65535 (https://github.com/apache/datafusion-spark/issues/365)
   query error DataFusion error: Execution error: The url is invalid: 
http://spark\.apache\.org:99999/path\. Use `try_parse_url` to tolerate invalid 
URL and return NULL instead\. SQLSTATE: 22P02
   SELECT parse_url('http://spark.apache.org:99999/path', 'HOST');
   ```
   
   I tried this locally with `main` merged in. The file passes with and without 
constant folding, and the PySpark runner reports 80 passes and 2 expected 
failures. Sorry for the churn, my earlier suggestion to comment it out came 
before #368 landed.
   



-- 
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]

Reply via email to