diff --git a/src/query/stream_schema_provider.rs b/src/query/stream_schema_provider.rs index 1a2d460ab..87d4d3442 100644 --- a/src/query/stream_schema_provider.rs +++ b/src/query/stream_schema_provider.rs @@ -51,7 +51,7 @@ use datafusion::{ scalar::ScalarValue, }; -use futures_util::{stream::FuturesOrdered, StreamExt, TryFutureExt, TryStreamExt}; +use futures_util::{stream::FuturesOrdered, StreamExt, TryStreamExt}; use itertools::Itertools; use object_store::{path::Path, ObjectStore}; use relative_path::RelativePathBuf; @@ -379,8 +379,9 @@ fn partitioned_files( .enumerate() .map(|(x, y)| (x % target_partition, y)) { + #[allow(unused_mut)] let catalog::manifest::File { - file_path, + mut file_path, num_rows, columns, .. @@ -392,23 +393,15 @@ fn partitioned_files( // the github issue- https://github.com/parseablehq/parseable/issues/824 // For some reason, the `from_absolute_path()` doesn't work for macos, hence the ugly solution // TODO: figure out an elegant solution to this - let pf; - - #[cfg(unix)] - { - pf = PartitionedFile::new(file_path, file.file_size); - } #[cfg(windows)] { - 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) - }; + if CONFIG.storage_name.eq("drive") { + file_path = object_store::path::Path::from_absolute_path(file_path).unwrap(); + } } - + let pf = PartitionedFile::new(file_path, file.file_size); partitioned_files[index].push(pf); + columns.into_iter().for_each(|col| { column_statistics .entry(col.name)