@@ -187,13 +187,6 @@ impl SkipAggregationProbe {
187
187
self . should_skip
188
188
}
189
189
190
- /// Provides an ability to externally set `should_skip` flag
191
- /// to `false` and prohibit further state updates
192
- fn forbid_skipping ( & mut self ) {
193
- self . should_skip = false ;
194
- self . is_locked = true ;
195
- }
196
-
197
190
/// Record the number of rows that were output directly without aggregation
198
191
fn record_skipped ( & mut self , batch : & RecordBatch ) {
199
192
self . skipped_aggregation_rows . add ( batch. num_rows ( ) ) ;
@@ -1009,19 +1002,12 @@ impl GroupedHashAggregateStream {
1009
1002
}
1010
1003
1011
1004
/// Updates skip aggregation probe state.
1012
- ///
1013
- /// In case stream has any spills, the probe is forcefully set to
1014
- /// forbid aggregation skipping, and locked, since spilling resets
1015
- /// total number of unique groups.
1016
- ///
1017
- /// Note: currently spilling is not supported for Partial aggregation
1018
1005
fn update_skip_aggregation_probe ( & mut self , input_rows : usize ) {
1019
1006
if let Some ( probe) = self . skip_aggregation_probe . as_mut ( ) {
1020
- if !self . spill_state . spills . is_empty ( ) {
1021
- probe. forbid_skipping ( ) ;
1022
- } else {
1023
- probe. update_state ( input_rows, self . group_values . len ( ) ) ;
1024
- }
1007
+ // Skip aggregation probe is not supported if stream has any spills,
1008
+ // currently spilling is not supported for Partial aggregation
1009
+ assert ! ( self . spill_state. spills. is_empty( ) ) ;
1010
+ probe. update_state ( input_rows, self . group_values . len ( ) ) ;
1025
1011
} ;
1026
1012
}
1027
1013
0 commit comments