@@ -560,8 +560,7 @@ fn summarize_column_statistics(
560560 } )
561561 . collect ( ) ;
562562
563- let coverage =
564- distinct_counts. len ( ) as f64 / num_row_groups. max ( 1 ) as f64 ;
563+ let coverage = distinct_counts. len ( ) as f64 / num_row_groups. max ( 1 ) as f64 ;
565564
566565 if coverage < PARTIAL_NDV_THRESHOLD {
567566 Precision :: Absent
@@ -1045,13 +1044,8 @@ mod tests {
10451044
10461045 let stats1 =
10471046 ParquetStatistics :: int32 ( Some ( 1 ) , Some ( 50 ) , Some ( 15 ) , Some ( 0 ) , false ) ;
1048- let stats2 = ParquetStatistics :: int32 (
1049- Some ( 51 ) ,
1050- Some ( 100 ) ,
1051- None ,
1052- Some ( 0 ) ,
1053- false ,
1054- ) ;
1047+ let stats2 =
1048+ ParquetStatistics :: int32 ( Some ( 51 ) , Some ( 100 ) , None , Some ( 0 ) , false ) ;
10551049
10561050 let row_group1 =
10571051 create_row_group_with_stats ( & schema_descr, vec ! [ Some ( stats1) ] , 500 ) ;
@@ -1078,15 +1072,32 @@ mod tests {
10781072 let schema_descr = create_schema_descr ( 1 ) ;
10791073 let arrow_schema = create_arrow_schema ( 1 ) ;
10801074
1081- let stats_with =
1082- |ndv| ParquetStatistics :: int32 ( Some ( 1 ) , Some ( 100 ) , Some ( ndv) , Some ( 0 ) , false ) ;
1075+ let stats_with = |ndv| {
1076+ ParquetStatistics :: int32 ( Some ( 1 ) , Some ( 100 ) , Some ( ndv) , Some ( 0 ) , false )
1077+ } ;
10831078 let stats_without =
10841079 ParquetStatistics :: int32 ( Some ( 1 ) , Some ( 100 ) , None , Some ( 0 ) , false ) ;
10851080
1086- let rg1 = create_row_group_with_stats ( & schema_descr, vec ! [ Some ( stats_with( 10 ) ) ] , 250 ) ;
1087- let rg2 = create_row_group_with_stats ( & schema_descr, vec ! [ Some ( stats_with( 20 ) ) ] , 250 ) ;
1088- let rg3 = create_row_group_with_stats ( & schema_descr, vec ! [ Some ( stats_with( 15 ) ) ] , 250 ) ;
1089- let rg4 = create_row_group_with_stats ( & schema_descr, vec ! [ Some ( stats_without) ] , 250 ) ;
1081+ let rg1 = create_row_group_with_stats (
1082+ & schema_descr,
1083+ vec ! [ Some ( stats_with( 10 ) ) ] ,
1084+ 250 ,
1085+ ) ;
1086+ let rg2 = create_row_group_with_stats (
1087+ & schema_descr,
1088+ vec ! [ Some ( stats_with( 20 ) ) ] ,
1089+ 250 ,
1090+ ) ;
1091+ let rg3 = create_row_group_with_stats (
1092+ & schema_descr,
1093+ vec ! [ Some ( stats_with( 15 ) ) ] ,
1094+ 250 ,
1095+ ) ;
1096+ let rg4 = create_row_group_with_stats (
1097+ & schema_descr,
1098+ vec ! [ Some ( stats_without) ] ,
1099+ 250 ,
1100+ ) ;
10901101 let metadata =
10911102 create_parquet_metadata ( schema_descr, vec ! [ rg1, rg2, rg3, rg4] ) ;
10921103
0 commit comments