Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: path fix for windows #973

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion server/src/query/stream_schema_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,18 @@ fn partitioned_files(
columns,
..
} = file;
partitioned_files[index].push(PartitionedFile::new(file_path, file.file_size));

// object_store::path::Path doesn't automatically deal with Windows path separators
// to do that, we are using from_absolute_path() which takes into consideration the underlying filesystem
// before sending the file path to PartitionedFile
let pf = if CONFIG.storage_name.eq("drive") {
let file_path = object_store::path::Path::from_absolute_path(file_path).unwrap();
PartitionedFile::new(file_path, file.file_size)
} else {
PartitionedFile::new(file_path, file.file_size)
};

partitioned_files[index].push(pf);
columns.into_iter().for_each(|col| {
column_statistics
.entry(col.name)
Expand Down
Loading