Expand description
Logic for selecting which rows to read: RowSelection and RowSelector
This module holds RowSelection and its public API, which dispatches to
one of the two backings depending on how the selection is stored:
selector: the run length backing,RowSelectorand its primitivesboolean: the bitmap backing,MaskSelectionand its primitives
The remaining modules hold the operations that are common to both:
algebra:and_then,intersectionandunionranges: mapping aRowSelectiononto page and batch rangescursor: iterating aRowSelectionwhile reading
Re-exportsยง
use crate::file::page_index::offset_index::PageLocation;๐use arrow_array::Array;๐use arrow_array::BooleanArray;๐use arrow_buffer::BooleanBuffer;๐use arrow_buffer::BooleanBufferBuilder;๐use arrow_select::filter::SlicesIterator;๐use std::cmp::Ordering;๐use std::collections::VecDeque;๐use std::ops::Range;๐use algebra::and_then_mask;๐use algebra::and_then_row_selections;๐use algebra::and_then_selectors_with_mask;๐use algebra::combine_mixed_selection;๐use algebra::intersect_masks;๐use algebra::intersect_row_selections;๐use algebra::union_masks;๐use algebra::union_row_selections;๐pub use boolean::MaskRunIter;use boolean::MaskSelection;๐use boolean::boolean_mask_from_selectors;๐use boolean::limit_mask;๐use boolean::mask_has_at_least_runs;๐use boolean::offset_mask;๐use boolean::split_off_mask;๐use boolean::trim_mask;๐pub(crate) use cursor::LoadedRowRanges;๐pub(crate) use cursor::MaskCursor;๐pub(crate) use cursor::RowSelectionStrategy;๐pub use cursor::RowSelectionCursor;pub use cursor::RowSelectionPolicy;use ranges::expand_to_batch_boundaries_from_selectors;๐use ranges::scan_ranges_from_mask;๐use ranges::scan_ranges_from_selectors;๐pub use selector::RowSelector;use selector::limit_selectors;๐use selector::offset_selectors;๐use selector::split_off_selectors;๐
Modulesยง
- algebra ๐
- Set algebra backing
RowSelection::and_then,RowSelection::intersectionandRowSelection::union - boolean ๐
- The bitmap backed representation of a
RowSelectionand the primitives operating on it: conversion to and from the run length (RowSelector) form, and the transforms backingsplit_off,trim,offsetandlimit. - cursor ๐
- Execution time iteration over a
RowSelection. - ranges ๐
- Mapping row selections onto ranges: the byte ranges
of the data pages that must be fetched (
RowSelection::scan_ranges) and the expansion of a selection to batch boundaries. - selector ๐
- The run length backed representation of a
RowSelection:RowSelectorand the primitives operating on a sequence of them.
Structsยง
- RowSelection
RowSelectionrepresents selecting a subset of rows when scanning a parquet file.
Enumsยง
- RowSelection
Inner ๐ - Internal storage for
RowSelection.
Functionsยง
- append_
normalized_ ๐selector - Appends a selector while maintaining the normalized selector invariants.
- auto_
min_ ๐mask_ runs - Returns the minimum normalized run count for which the Auto selection policy would prefer a mask to RLE.
- filters_
to_ ๐boolean_ buffer - selectors_
below_ ๐run_ limit - Builds normalized selectors while their run count remains below
min_mask_runs. ReturningNonedrops the partial selector allocation before the caller constructs a mask.