nuno-faria commented on code in PR #17231:
URL: https://github.com/apache/datafusion/pull/17231#discussion_r2287433523


##########
datafusion/core/tests/tracing/mod.rs:
##########
@@ -76,7 +76,12 @@ async fn run_query() {
     let ctx = SessionContext::new();
 
     // Get the test data directory
-    let test_data = parquet_test_data();
+    let mut test_data = parquet_test_data();
+    if cfg!(target_os = "windows") {
+        // Replace backslashes (Windows paths) as they are invalid: 
https://datatracker.ietf.org/doc/html/rfc8089#appendix-E.4
+        // Also add "/", as Windows paths start with <Drive>:/ instead of "/"
+        test_data = format!("/{}", test_data.replace("\\", "/"))
+    }

Review Comment:
   I've replaced the backslashes directly in `parquet_test_data`, which should 
help prevent errors in new tests.
   However, I still needed to prepend the path with `/` in that function, since 
it is passed directly to `test://`, and the URI should be `test:///C:/...` 
instead of `test://C:/` (this cannot be done in `parquet_test_data`, as it will 
make the path invalid for other tests).



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to