pub(crate) struct RowGroupFrontier {
pub(super) parquet_metadata: Arc<ParquetMetaData>,
queued: QueuedRowGroups,
pub(super) budget: RowBudget,
pub(super) has_predicates: bool,
}Fields§
§parquet_metadata: Arc<ParquetMetaData>Metadata used to resolve row counts for queued row groups.
queued: QueuedRowGroupsRow groups not yet handed to the builder.
budget: RowBudgetOffset/limit budget before the next readable row group is planned.
has_predicates: boolIf predicates are present, row groups with selected rows must be read so the predicate can decide whether they are actually needed.
Implementations§
Source§impl RowGroupFrontier
impl RowGroupFrontier
pub(crate) fn new( parquet_metadata: Arc<ParquetMetaData>, row_group_plan: RowGroupPlan, budget: RowBudget, has_predicates: bool, ) -> Result<Self, ParquetError>
Sourcepub(crate) fn queued_row_groups(&self) -> impl Iterator<Item = usize> + '_
pub(crate) fn queued_row_groups(&self) -> impl Iterator<Item = usize> + '_
The queued row groups, in no specific order and without duplicates.
Sourcepub(crate) fn is_queued(&self, row_group_idx: usize) -> bool
pub(crate) fn is_queued(&self, row_group_idx: usize) -> bool
Returns true if row_group_idx is still queued to be read.
pub(crate) fn update_budget_after_row_group(&mut self, budget: RowBudget)
Sourcepub(crate) fn peek_next_row_group(&self) -> Result<Option<usize>, ParquetError>
pub(crate) fn peek_next_row_group(&self) -> Result<Option<usize>, ParquetError>
Peek at the next row-group index Self::next_readable_row_group
would hand out, without mutating any state. Returns None if every
remaining row group would be skipped under the current
selection/budget, or if the queue is empty.
Runs the real Self::next_readable_row_group advance logic on a
throwaway clone of the frontier, so peek can never drift from the
read path. The clone copies the queued row-group plan and selections;
see
RemainingRowGroups::peek_next_row_group.
Sourcepub(crate) fn row_groups_remaining(&self) -> usize
pub(crate) fn row_groups_remaining(&self) -> usize
Number of row groups not yet handed to the builder.
Sourcepub(crate) fn into_parts(
self,
) -> (Arc<ParquetMetaData>, RowGroupPlan, RowBudget)
pub(crate) fn into_parts( self, ) -> (Arc<ParquetMetaData>, RowGroupPlan, RowBudget)
Decompose into the metadata, the row groups not yet handed to the builder, and the remaining offset/limit budget.
fn clear_remaining(&mut self)
Sourcefn plan_selected_row_group(
&self,
next_row_group: NextRowGroup,
selected_rows: usize,
) -> QueuedRowGroupDecision
fn plan_selected_row_group( &self, next_row_group: NextRowGroup, selected_rows: usize, ) -> QueuedRowGroupDecision
Plan whether a selected row group should be read or skipped.
Selection-only skips are handled before this method is called. This method applies the remaining offset/limit budget and predicate conservatism.
Sourcepub(crate) fn next_readable_row_group(
&mut self,
) -> Result<Option<NextRowGroup>, ParquetError>
pub(crate) fn next_readable_row_group( &mut self, ) -> Result<Option<NextRowGroup>, ParquetError>
Advance queued row groups until one should be handed to the builder.