@@ -25,6 +25,7 @@ use std::collections::BinaryHeap;
25
25
use std:: iter:: repeat_with;
26
26
use std:: mem;
27
27
use std:: ops:: { Index , IndexMut } ;
28
+ use std:: sync:: Arc ;
28
29
29
30
/// Repartition input files into `target_partitions` partitions, if total file size exceed
30
31
/// `repartition_file_min_size`
@@ -368,7 +369,7 @@ pub struct FileGroup {
368
369
/// The files in this group
369
370
files : Vec < PartitionedFile > ,
370
371
/// Optional statistics for the data across all files in the group
371
- statistics : Option < Statistics > ,
372
+ statistics : Option < Arc < Statistics > > ,
372
373
}
373
374
374
375
impl FileGroup {
@@ -386,7 +387,7 @@ impl FileGroup {
386
387
}
387
388
388
389
/// Set the statistics for this group
389
- pub fn with_statistics ( mut self , statistics : Statistics ) -> Self {
390
+ pub fn with_statistics ( mut self , statistics : Arc < Statistics > ) -> Self {
390
391
self . statistics = Some ( statistics) ;
391
392
self
392
393
}
@@ -420,7 +421,7 @@ impl FileGroup {
420
421
421
422
/// Get the statistics for this group
422
423
pub fn statistics ( & self ) -> Option < & Statistics > {
423
- self . statistics . as_ref ( )
424
+ self . statistics . as_deref ( )
424
425
}
425
426
426
427
/// Partition the list of files into `n` groups
0 commit comments