@@ -126,7 +126,7 @@ struct TestOutput {
126126impl TestOutput {
127127 /// retrieve the value of the named metric, if any
128128 fn metric_value ( & self , metric_name : & str ) -> Option < usize > {
129- if let Some ( ( pruned, _matched) ) = self . pruning_metric ( metric_name) {
129+ if let Some ( ( pruned, _matched, _fully ) ) = self . pruning_metric ( metric_name) {
130130 return Some ( pruned) ;
131131 }
132132
@@ -140,9 +140,10 @@ impl TestOutput {
140140 } )
141141 }
142142
143- fn pruning_metric ( & self , metric_name : & str ) -> Option < ( usize , usize ) > {
143+ fn pruning_metric ( & self , metric_name : & str ) -> Option < ( usize , usize , usize ) > {
144144 let mut total_pruned = 0 ;
145145 let mut total_matched = 0 ;
146+ let mut total_fully_matched = 0 ;
146147 let mut found = false ;
147148
148149 for metric in self . parquet_metrics . iter ( ) {
@@ -154,13 +155,15 @@ impl TestOutput {
154155 {
155156 total_pruned += pruning_metrics. pruned ( ) ;
156157 total_matched += pruning_metrics. matched ( ) ;
158+ total_fully_matched += pruning_metrics. fully_matched ( ) ;
159+
157160 found = true ;
158161 }
159162 }
160163 }
161164
162165 if found {
163- Some ( ( total_pruned, total_matched) )
166+ Some ( ( total_pruned, total_matched, total_fully_matched ) )
164167 } else {
165168 None
166169 }
@@ -172,32 +175,33 @@ impl TestOutput {
172175 }
173176
174177 /// The number of row_groups pruned / matched by bloom filter
175- fn row_groups_bloom_filter ( & self ) -> Option < ( usize , usize ) > {
178+ fn row_groups_bloom_filter ( & self ) -> Option < ( usize , usize , usize ) > {
176179 self . pruning_metric ( "row_groups_pruned_bloom_filter" )
177180 }
178181
179182 /// The number of row_groups matched by statistics
180183 fn row_groups_matched_statistics ( & self ) -> Option < usize > {
181184 self . pruning_metric ( "row_groups_pruned_statistics" )
182- . map ( |( _pruned, matched) | matched)
185+ . map ( |( _pruned, matched, _fully ) | matched)
183186 }
184187
185188 /// The number of row_groups fully matched by statistics
186189 fn row_groups_fully_matched_statistics ( & self ) -> Option < usize > {
187- self . metric_value ( "row_groups_fully_matched_statistics" )
190+ self . pruning_metric ( "row_groups_pruned_statistics" )
191+ . map ( |( _pruned, _, fully) | fully)
188192 }
189193
190194 /// The number of row_groups pruned by statistics
191195 fn row_groups_pruned_statistics ( & self ) -> Option < usize > {
192196 self . pruning_metric ( "row_groups_pruned_statistics" )
193- . map ( |( pruned, _matched) | pruned)
197+ . map ( |( pruned, _matched, _fully ) | pruned)
194198 }
195199
196200 /// Metric `files_ranges_pruned_statistics` tracks both pruned and matched count,
197201 /// for testing purpose, here it only aggregate the `pruned` count.
198202 fn files_ranges_pruned_statistics ( & self ) -> Option < usize > {
199203 self . pruning_metric ( "files_ranges_pruned_statistics" )
200- . map ( |( pruned, _matched) | pruned)
204+ . map ( |( pruned, _matched, _fully ) | pruned)
201205 }
202206
203207 /// The number of row_groups matched by bloom filter or statistics
@@ -207,26 +211,27 @@ impl TestOutput {
207211 /// count.
208212 fn row_groups_matched ( & self ) -> Option < usize > {
209213 self . row_groups_bloom_filter ( )
210- . map ( |( _pruned, matched) | matched)
214+ . map ( |( _pruned, matched, _fully ) | matched)
211215 }
212216
213217 /// The number of row_groups pruned
214218 fn row_groups_pruned ( & self ) -> Option < usize > {
215219 self . row_groups_bloom_filter ( )
216- . map ( |( pruned, _matched) | pruned)
220+ . map ( |( pruned, _matched, _fully ) | pruned)
217221 . zip ( self . row_groups_pruned_statistics ( ) )
218222 . map ( |( a, b) | a + b)
219223 }
220224
221225 /// The number of row pages pruned
222226 fn row_pages_pruned ( & self ) -> Option < usize > {
223227 self . pruning_metric ( "page_index_rows_pruned" )
224- . map ( |( pruned, _matched) | pruned)
228+ . map ( |( pruned, _matched, _fully ) | pruned)
225229 }
226230
227231 /// The number of row groups pruned by limit pruning
228232 fn limit_pruned_row_groups ( & self ) -> Option < usize > {
229- self . metric_value ( "limit_pruned_row_groups" )
233+ self . pruning_metric ( "limit_pruned_row_groups" )
234+ . map ( |( pruned, _, _) | pruned)
230235 }
231236
232237 fn description ( & self ) -> String {
0 commit comments