Skip to content

Commit 32acd9d

Browse files
committed
test: allow external_access_plan run on windows
1 parent 207e855 commit 32acd9d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

datafusion/core/tests/parquet/external_access_plan.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,14 @@ impl TestFull {
319319
file_size,
320320
} = get_test_data();
321321

322-
let mut partitioned_file = PartitionedFile::new(file_name, *file_size);
322+
let new_file_name = if cfg!(target_os = "windows") {
323+
// Windows path separator is different from Unix
324+
file_name.replace("\\", "/")
325+
} else {
326+
file_name.clone()
327+
};
328+
329+
let mut partitioned_file = PartitionedFile::new(new_file_name, *file_size);
323330

324331
// add the access plan, if any, as an extension
325332
if let Some(access_plan) = access_plan {

datafusion/core/tests/parquet/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ use std::sync::Arc;
4343
use tempfile::NamedTempFile;
4444

4545
mod custom_reader;
46-
// Don't run on windows as tempfiles don't seem to work the same
47-
#[cfg(not(target_os = "windows"))]
4846
mod external_access_plan;
4947
mod file_statistics;
5048
#[cfg(not(target_family = "windows"))]

0 commit comments

Comments
 (0)