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


##########
datafusion/core/tests/parquet/encryption.rs:
##########
@@ -284,7 +284,15 @@ fn verify_file_encrypted(
     options
         .options
         .insert("test_key".to_string(), "test value".to_string());
-    let object_path = 
object_store::path::Path::from(file_path.to_str().unwrap());
+
+    // the paths in encryption_factory are stored with "/", so we need to 
replace them on Windows
+    let file_path_str = if cfg!(target_os = "windows") {
+        file_path.to_str().unwrap().replace("\\", "/")
+    } else {
+        file_path.to_str().unwrap().to_owned()
+    };

Review Comment:
   I've tracked it down to when the Parquet files are written, where the path 
is transformed by the `ListingTableUrl::parse` function. Eventually those 
converted paths make their way to the encryption properties, resulting in the 
mismatch we see in the test. I do know if its a good idea to change that 
behavior, I think its better to change this particular test.



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