Ted-Jiang commented on code in PR #10738: URL: https://github.com/apache/datafusion/pull/10738#discussion_r1628732681
########## 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: @alamb maybe we can check after the `intersection` the result row_selection is select 0 row ? 🤔 then we can cast it to skip. IMO select-0 seems need do more effort in next round check. -- 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