xudong963 commented on code in PR #22085:
URL: https://github.com/apache/datafusion/pull/22085#discussion_r3216957167


##########
datafusion/datasource-parquet/src/page_filter.rs:
##########
@@ -199,9 +199,15 @@ impl PagePruningAccessPlanFilter {
         for row_group_index in row_group_indexes {
             // The selection for this particular row group
             let mut overall_selection = None;
-            let mut total_pages_in_group = 0;
+
+            let total_pages_in_group = 
parquet_metadata.offset_index().map_or(0, |x| {
+                x[row_group_index]
+                    .first()
+                    .map_or(0, |x| x.page_locations.len())
+            });

Review Comment:
   nit:
   
   ```suggestion
               let total_pages_in_group = 
parquet_metadata.offset_index().map_or(0, |offset_index| {
                   offset_index[row_group_index]
                       .first()
                       .map_or(0, |column| column.page_locations.len())
               });
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to