This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new dd988f6efc Fix test that's broken on Windows due to naive path 
handling (#20692)
dd988f6efc is described below

commit dd988f6efc22f035524a9a8d6cd7f35599b55929
Author: Alexander Rafferty <[email protected]>
AuthorDate: Fri Mar 6 08:39:26 2026 +1100

    Fix test that's broken on Windows due to naive path handling (#20692)
    
    ## Which issue does this PR close?
    
    Fixed a test that was failing on Windows due to naive path handling.
---
 datafusion/core/src/datasource/mod.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/datafusion/core/src/datasource/mod.rs 
b/datafusion/core/src/datasource/mod.rs
index 32b3b0799d..c0cb9b5fa0 100644
--- a/datafusion/core/src/datasource/mod.rs
+++ b/datafusion/core/src/datasource/mod.rs
@@ -76,6 +76,7 @@ mod tests {
     use datafusion_physical_plan::collect;
     use std::{fs, sync::Arc};
     use tempfile::TempDir;
+    use url::Url;
 
     #[tokio::test]
     async fn can_override_physical_expr_adapter() {
@@ -103,7 +104,8 @@ mod tests {
         writer.write(&rec_batch).unwrap();
         writer.close().unwrap();
 
-        let location = Path::parse(path.to_str().unwrap()).unwrap();
+        let url = Url::from_file_path(path.canonicalize().unwrap()).unwrap();
+        let location = Path::from_url_path(url.path()).unwrap();
         let metadata = fs::metadata(path.as_path()).expect("Local file 
metadata");
         let meta = ObjectMeta {
             location,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to