mod adaptor;
mod projection;
mod selection;
use std::sync::Arc;
use vortex_buffer::Alignment;
use vortex_io::request::IoTarget;
use vortex_mask::Mask;
use vortex_scan::planning::planner::WorkScope;
use vortex_session::VortexSession;
pub(super) use self::selection::plan_selection;
use crate::plan::physical::PlanRef;
use crate::plan::physical::pipeline::ValueCache;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct SegmentLocation {
pub offset: u64,
pub length: u32,
pub alignment: Alignment,
}
impl SegmentLocation {
fn target(&self) -> IoTarget {
IoTarget::Range {
offset: self.offset,
len: self.length as usize,
alignment: self.alignment,
}
}
}
#[derive(Clone)]
pub(super) struct ScanPlans {
pub(super) session: VortexSession,
pub(super) locations: Arc<[SegmentLocation]>,
pub(super) projection: PlanRef,
pub(super) row_offset: u64,
pub(super) values: ValueCache,
}
struct SelectedRows {
scope: WorkScope,
mask: Mask,
}