Skip to main content

Module selection

Module selection 

Source
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, RowSelector and its primitives
  • boolean: the bitmap backing, MaskSelection and its primitives

The remaining modules hold the operations that are common to both:

  • algebra: and_then, intersection and union
  • ranges: mapping a RowSelection onto page and batch ranges
  • cursor: iterating a RowSelection while 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::intersection and RowSelection::union
boolean ๐Ÿ”’
The bitmap backed representation of a RowSelection and the primitives operating on it: conversion to and from the run length (RowSelector) form, and the transforms backing split_off, trim, offset and limit.
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: RowSelector and the primitives operating on a sequence of them.

Structsยง

RowSelection
RowSelection represents selecting a subset of rows when scanning a parquet file.

Enumsยง

RowSelectionInner ๐Ÿ”’
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. Returning None drops the partial selector allocation before the caller constructs a mask.