NativeColumnarPipeline

Struct NativeColumnarPipeline 

Source
pub struct NativeColumnarPipeline { /* private fields */ }
Expand description

Native columnar execution pipeline.

This pipeline operates on data in columnar format throughout the execution, only converting to rows at the final output stage. This provides maximum performance for large-scale analytical queries.

§Performance

Uses LLVM auto-vectorization for SIMD-accelerated operations.

§Performance Characteristics

  • Filter: SIMD-accelerated predicate evaluation (4-8x speedup)
  • Projection: Zero-copy column selection
  • Aggregation: SIMD reduction operations (10x speedup)
  • GROUP BY: Hash-based grouping with columnar aggregation

§When to Use

  • Large datasets (>100k rows)
  • TPC-H style analytical queries
  • Simple GROUP BY with column references
  • Single table scans without complex JOINs

§Limitations

  • No JOIN support (single table only)
  • GROUP BY limited to simple column references
  • No ROLLUP/CUBE/GROUPING SETS support
  • Requires columnar storage format

Implementations§

Source§

impl NativeColumnarPipeline

Source

pub fn new() -> Self

Create a new native columnar pipeline.

Source

pub fn with_storage(has_columnar_storage: bool) -> Self

Create a native columnar pipeline with explicit columnar storage availability.

Trait Implementations§

Source§

impl Default for NativeColumnarPipeline

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl ExecutionPipeline for NativeColumnarPipeline

Source§

fn create_evaluator<'a>( &self, ctx: &'a ExecutionContext<'a>, ) -> CombinedExpressionEvaluator<'a>

Create an evaluator with context for native columnar execution.

Source§

fn apply_filter( &self, input: PipelineInput<'_>, predicate: Option<&Expression>, ctx: &ExecutionContext<'_>, ) -> Result<PipelineOutput, ExecutorError>

Apply WHERE clause filtering using SIMD-accelerated columnar operations.

This is the most optimized path:

  1. Extracts simple predicates from WHERE clause
  2. Applies SIMD filtering directly on column arrays
  3. Returns filtered columnar batch (converted to rows for output)
Source§

fn apply_projection( &self, input: PipelineInput<'_>, select_items: &[SelectItem], ctx: &ExecutionContext<'_>, ) -> Result<PipelineOutput, ExecutorError>

Apply SELECT projection using columnar operations.

In native columnar execution, projection is typically implicit - we only compute the required columns. For explicit projection, we fall back to row-oriented processing only when necessary.

Source§

fn apply_aggregation( &self, input: PipelineInput<'_>, select_items: &[SelectItem], group_by: Option<&[Expression]>, having: Option<&Expression>, ctx: &ExecutionContext<'_>, ) -> Result<PipelineOutput, ExecutorError>

Execute aggregation using SIMD-accelerated columnar operations.

This is the most optimized aggregation path:

  1. Extracts aggregate specifications from SELECT list
  2. For simple aggregates without GROUP BY: Uses SIMD reductions
  3. For GROUP BY: Uses hash-based grouping with columnar aggregation
Source§

fn supports_query_pattern( &self, has_aggregation: bool, _has_group_by: bool, has_joins: bool, ) -> bool

Native columnar supports simple aggregates with optional GROUP BY.

Source§

fn name(&self) -> &'static str

Get the name of this pipeline for debugging/logging.
Source§

fn apply_limit_offset( &self, input: PipelineOutput, limit: Option<u64>, offset: Option<u64>, ) -> Result<Vec<Row>, ExecutorError>

Apply LIMIT and OFFSET to the results. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,