File tree Expand file tree Collapse file tree
datafusion/functions-aggregate/src/min_max Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,9 +515,9 @@ impl MinMaxBytesState {
515515
516516 /// Emits the specified min_max values
517517 ///
518- /// Returns (data_capacity , min_maxes), updating the current value of total_data_bytes
518+ /// Returns (data_bytes , min_maxes), updating the current value of total_data_bytes
519519 ///
520- /// - `data_capacity `: the total length of all strings and their contents ,
520+ /// - `data_bytes `: the total byte length of the emitted values ,
521521 /// - `min_maxes`: the actual min/max values for each group
522522 fn emit_to ( & mut self , emit_to : EmitTo ) -> ( usize , Vec < Option < Vec < u8 > > > ) {
523523 match emit_to {
@@ -530,17 +530,17 @@ impl MinMaxBytesState {
530530 }
531531 EmitTo :: First ( n) => {
532532 let first_min_maxes = split_vec_min_alloc ( & mut self . min_max , n) ;
533- let first_data_capacity : usize = first_min_maxes
533+ let first_data_bytes : usize = first_min_maxes
534534 . iter ( )
535535 . map ( |opt| opt. as_ref ( ) . map ( |s| s. len ( ) ) . unwrap_or ( 0 ) )
536536 . sum ( ) ;
537- self . total_data_bytes -= first_data_capacity ;
537+ self . total_data_bytes -= first_data_bytes ;
538538 self . total_data_capacity -= first_min_maxes
539539 . iter ( )
540540 . flatten ( )
541541 . map ( Vec :: capacity)
542542 . sum :: < usize > ( ) ;
543- ( first_data_capacity , first_min_maxes)
543+ ( first_data_bytes , first_min_maxes)
544544 }
545545 }
546546 }
You can’t perform that action at this time.
0 commit comments