haohuaijin commented on code in PR #10859:
URL: https://github.com/apache/arrow-rs/pull/10859#discussion_r4129245889
##########
parquet/src/arrow/arrow_reader/read_plan.rs:
##########
@@ -157,17 +157,7 @@ impl ReadPlanBuilder {
///
/// Guarantees to return either `Selectors` or `Mask`, never `Auto`.
pub(crate) fn resolve_selection_strategy(&self) -> RowSelectionStrategy {
- match self.row_selection_policy {
- RowSelectionPolicy::Selectors => RowSelectionStrategy::Selectors,
- RowSelectionPolicy::Mask => RowSelectionStrategy::Mask,
- RowSelectionPolicy::Auto { threshold, .. } => {
- let Some(selection) = self.selection.as_ref() else {
- return RowSelectionStrategy::Selectors;
- };
-
- selection.auto_selection_strategy(threshold)
- }
- }
+ self.row_selection_policy.resolve(self.selection.as_ref())
Review Comment:
sure, i will do this as a follow up
##########
parquet/src/arrow/arrow_reader/read_plan.rs:
##########
@@ -157,17 +157,7 @@ impl ReadPlanBuilder {
///
/// Guarantees to return either `Selectors` or `Mask`, never `Auto`.
pub(crate) fn resolve_selection_strategy(&self) -> RowSelectionStrategy {
- match self.row_selection_policy {
- RowSelectionPolicy::Selectors => RowSelectionStrategy::Selectors,
- RowSelectionPolicy::Mask => RowSelectionStrategy::Mask,
- RowSelectionPolicy::Auto { threshold, .. } => {
- let Some(selection) = self.selection.as_ref() else {
- return RowSelectionStrategy::Selectors;
- };
-
- selection.auto_selection_strategy(threshold)
- }
- }
+ self.row_selection_policy.resolve(self.selection.as_ref())
Review Comment:
okay, i will do this as a follow up
--
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]