alamb commented on code in PR #10738:
URL: https://github.com/apache/datafusion/pull/10738#discussion_r1629399085


##########
datafusion/core/src/datasource/physical_plan/parquet/page_filter.rs:
##########
@@ -236,6 +225,24 @@ impl PagePruningPredicate {
     }
 }
 
+/// returns the number of rows skipped in the selection
+/// TODO should this be upstreamed to RowSelection?
+fn rows_skipped(selection: &RowSelection) -> usize {
+    selection
+        .iter()
+        .fold(0, |acc, x| if x.skip { acc + x.row_count } else { acc })
+}
+
+fn update_selection(
+    current_selection: Option<RowSelection>,
+    row_selection: RowSelection,
+) -> Option<RowSelection> {
+    match current_selection {
+        None => Some(row_selection),
+        Some(current_selection) => 
Some(current_selection.intersection(&row_selection)),

Review Comment:
   Good idea. Thank you @Ted-Jiang I made this change in e2dec6120



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to