andygrove opened a new issue, #451:
URL: https://github.com/apache/datafusion-spark/issues/451

   ## Describe the bug
   
   When the authority has more than one colon and the host is not in brackets, 
`java.net.URI` cannot parse it as a server authority. It falls back to a 
registry-based authority. Spark then returns NULL for `HOST` and `USERINFO`, 
but still returns the raw `AUTHORITY` and the other parts of the URL.
   
   datafusion-spark returns NULL for every part, or raises an error when ANSI 
mode is on.
   
   ## To Reproduce
   
   ```sql
   SELECT parse_url('http://a:b:99999/path', 'AUTHORITY'), 
parse_url('http://a:b:99999/path', 'PATH');
   ```
   
   ## Expected behavior
   
   Spark 4.2.0 returns `a:b:99999` and `/path`, in both ANSI and non-ANSI mode. 
`HOST` and `USERINFO` are NULL.
   
   ## Additional context
   
   Found while reviewing #390, which adds a fallback for ports that do not fit 
in 16 bits. The same registry-based fallback would cover this case, but the URL 
has to be rewritten differently. This is not a regression from #390, because 
`main` also returns NULL here.
   


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