File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
datafusion/datasource-parquet/src Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -181,20 +181,13 @@ impl RowGroupAccessPlanFilter {
181181 // try to prune the row groups in a single call
182182 match predicate. prune ( & pruning_stats) {
183183 Ok ( values) => {
184- let mut new_access_plan = ParquetAccessPlan :: new_all ( groups. len ( ) ) ;
185184 let mut fully_contained_candidates_original_idx: Vec < usize > = Vec :: new ( ) ;
186-
187- for ( idx_in_pruning_stats_result, & pruning_result) in
188- values. iter ( ) . enumerate ( )
189- {
190- let original_row_group_idx =
191- row_group_indexes[ idx_in_pruning_stats_result] ;
192- if !pruning_result {
193- new_access_plan. skip ( original_row_group_idx) ;
185+ for ( idx, & value) in row_group_indexes. iter ( ) . zip ( values. iter ( ) ) {
186+ if !value {
187+ self . access_plan . skip ( * idx) ;
194188 metrics. row_groups_pruned_statistics . add ( 1 ) ;
195189 } else {
196- fully_contained_candidates_original_idx
197- . push ( original_row_group_idx) ;
190+ fully_contained_candidates_original_idx. push ( * idx) ;
198191 metrics. row_groups_matched_statistics . add ( 1 ) ;
199192 }
200193 }
@@ -238,7 +231,6 @@ impl RowGroupAccessPlanFilter {
238231 }
239232 }
240233 }
241- self . access_plan = new_access_plan;
242234 }
243235 // stats filter array could not be built, so we can't prune
244236 Err ( e) => {
You can’t perform that action at this time.
0 commit comments