davidlghellin opened a new pull request, #20506:
URL: https://github.com/apache/datafusion/pull/20506

   ## Which issue does this PR close?
   
   - NA
   
   ## Rationale for this change
   
   Spark's `java.net.URI` treats schemeless strings (e.g. `'notaurl'`) as 
relative URIs where the entire input becomes the path component. The Rust `url` 
crate rejects these with `RelativeUrlWithoutBase`, and the current 
implementation maps all such errors to `NULL` — but Spark returns the input 
string for `PATH` and `FILE`.
   
   ## What changes are included in this PR?
   
   - In `parse_url.rs`, when catching `RelativeUrlWithoutBase` for schemeless 
URLs, return the input string for `PATH` and `FILE` parts instead of `NULL`
   - Updated unit tests and sqllogictests for both `parse_url` and 
`try_parse_url`
   
   ## Are these changes tested?
   
   Yes:
   - Unit test `test_parse_schemeless_url` covers all 8 URL parts against a 
schemeless input
   - sqllogictest coverage in `parse_url.slt` and `try_parse_url.slt`
   
   ## Are there any user-facing changes?
   
   Yes — `parse_url('notaurl', 'PATH')` and `parse_url('notaurl', 'FILE')` now 
return `'notaurl'` instead of `NULL`, matching Spark behavior.
   


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