@@ -314,7 +314,7 @@ impl<'a> DFParquetMetadata<'a> {
314314
315315 get_col_stats (
316316 table_schema,
317- null_counts_array,
317+ & null_counts_array,
318318 & mut max_accs,
319319 & mut min_accs,
320320 & mut is_max_value_exact,
@@ -362,7 +362,7 @@ fn create_max_min_accs(
362362
363363fn get_col_stats (
364364 schema : & Schema ,
365- null_counts : Vec < Precision < usize > > ,
365+ null_counts : & [ Precision < usize > ] ,
366366 max_values : & mut [ Option < MaxAccumulator > ] ,
367367 min_values : & mut [ Option < MinAccumulator > ] ,
368368 is_max_value_exact : & mut [ Option < bool > ] ,
@@ -432,19 +432,19 @@ fn summarize_min_max_null_counts(
432432 max_acc. update_batch ( & [ Arc :: clone ( & max_values) ] ) ?;
433433 let mut cur_max_acc = max_acc. clone ( ) ;
434434 accumulators. is_max_value_exact [ arrow_schema_index] = has_any_exact_match (
435- cur_max_acc. evaluate ( ) ?,
436- max_values,
437- is_max_value_exact_stat,
435+ & cur_max_acc. evaluate ( ) ?,
436+ & max_values,
437+ & is_max_value_exact_stat,
438438 ) ;
439439 }
440440
441441 if let Some ( min_acc) = & mut accumulators. min_accs [ arrow_schema_index] {
442442 min_acc. update_batch ( & [ Arc :: clone ( & min_values) ] ) ?;
443443 let mut cur_min_acc = min_acc. clone ( ) ;
444444 accumulators. is_min_value_exact [ arrow_schema_index] = has_any_exact_match (
445- cur_min_acc. evaluate ( ) ?,
446- min_values,
447- is_min_value_exact_stat,
445+ & cur_min_acc. evaluate ( ) ?,
446+ & min_values,
447+ & is_min_value_exact_stat,
448448 ) ;
449449 }
450450
@@ -475,13 +475,13 @@ fn summarize_min_max_null_counts(
475475/// values are `[true, false, false]`. Since at least one is `true`, the
476476/// function returns `Some(true)`.
477477fn has_any_exact_match (
478- value : ScalarValue ,
479- array : ArrayRef ,
480- exactness : BooleanArray ,
478+ value : & ScalarValue ,
479+ array : & ArrayRef ,
480+ exactness : & BooleanArray ,
481481) -> Option < bool > {
482482 let scalar_array = value. to_scalar ( ) . ok ( ) ?;
483483 let eq_mask = eq ( & scalar_array, & array) . ok ( ) ?;
484- let combined_mask = and ( & eq_mask, & exactness) . ok ( ) ?;
484+ let combined_mask = and ( & eq_mask, exactness) . ok ( ) ?;
485485 Some ( combined_mask. true_count ( ) > 0 )
486486}
487487
@@ -531,7 +531,7 @@ mod tests {
531531 let exactness =
532532 BooleanArray :: from ( vec ! [ true , false , false , false , false , false ] ) ;
533533
534- let result = has_any_exact_match ( computed_min, row_group_mins, exactness) ;
534+ let result = has_any_exact_match ( & computed_min, & row_group_mins, & exactness) ;
535535 assert_eq ! ( result, Some ( true ) ) ;
536536 }
537537 // Case 2: All inexact matches
@@ -542,7 +542,7 @@ mod tests {
542542 let exactness =
543543 BooleanArray :: from ( vec ! [ false , false , false , false , false , false ] ) ;
544544
545- let result = has_any_exact_match ( computed_min, row_group_mins, exactness) ;
545+ let result = has_any_exact_match ( & computed_min, & row_group_mins, & exactness) ;
546546 assert_eq ! ( result, Some ( false ) ) ;
547547 }
548548 // Case 3: All exact matches
@@ -553,7 +553,7 @@ mod tests {
553553 let exactness =
554554 BooleanArray :: from ( vec ! [ false , true , true , true , false , true ] ) ;
555555
556- let result = has_any_exact_match ( computed_max, row_group_maxes, exactness) ;
556+ let result = has_any_exact_match ( & computed_max, & row_group_maxes, & exactness) ;
557557 assert_eq ! ( result, Some ( true ) ) ;
558558 }
559559 // Case 4: All maxes are null values
@@ -563,7 +563,7 @@ mod tests {
563563 Arc :: new ( Int32Array :: from ( vec ! [ None , None , None , None ] ) ) as ArrayRef ;
564564 let exactness = BooleanArray :: from ( vec ! [ None , Some ( true ) , None , Some ( false ) ] ) ;
565565
566- let result = has_any_exact_match ( computed_max, row_group_maxes, exactness) ;
566+ let result = has_any_exact_match ( & computed_max, & row_group_maxes, & exactness) ;
567567 assert_eq ! ( result, Some ( false ) ) ;
568568 }
569569 }
0 commit comments