@@ -51,7 +51,7 @@ use datafusion::{
51
51
scalar:: ScalarValue ,
52
52
} ;
53
53
54
- use futures_util:: { stream:: FuturesOrdered , StreamExt , TryFutureExt , TryStreamExt } ;
54
+ use futures_util:: { stream:: FuturesOrdered , StreamExt , TryStreamExt } ;
55
55
use itertools:: Itertools ;
56
56
use object_store:: { path:: Path , ObjectStore } ;
57
57
use relative_path:: RelativePathBuf ;
@@ -379,8 +379,9 @@ fn partitioned_files(
379
379
. enumerate ( )
380
380
. map ( |( x, y) | ( x % target_partition, y) )
381
381
{
382
+ #[ allow( unused_mut) ]
382
383
let catalog:: manifest:: File {
383
- file_path,
384
+ mut file_path,
384
385
num_rows,
385
386
columns,
386
387
..
@@ -392,23 +393,15 @@ fn partitioned_files(
392
393
// the github issue- https://github.com/parseablehq/parseable/issues/824
393
394
// For some reason, the `from_absolute_path()` doesn't work for macos, hence the ugly solution
394
395
// TODO: figure out an elegant solution to this
395
- let pf;
396
-
397
- #[ cfg( unix) ]
398
- {
399
- pf = PartitionedFile :: new ( file_path, file. file_size ) ;
400
- }
401
396
#[ cfg( windows) ]
402
397
{
403
- pf = if CONFIG . storage_name . eq ( "drive" ) {
404
- let file_path = object_store:: path:: Path :: from_absolute_path ( file_path) . unwrap ( ) ;
405
- PartitionedFile :: new ( file_path, file. file_size )
406
- } else {
407
- PartitionedFile :: new ( file_path, file. file_size )
408
- } ;
398
+ if CONFIG . storage_name . eq ( "drive" ) {
399
+ file_path = object_store:: path:: Path :: from_absolute_path ( file_path) . unwrap ( ) ;
400
+ }
409
401
}
410
-
402
+ let pf = PartitionedFile :: new ( file_path , file . file_size ) ;
411
403
partitioned_files[ index] . push ( pf) ;
404
+
412
405
columns. into_iter ( ) . for_each ( |col| {
413
406
column_statistics
414
407
. entry ( col. name )
0 commit comments