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
impl NativeColumnarPipeline
Sourcepub fn with_storage(has_columnar_storage: bool) -> Self
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
impl Default for NativeColumnarPipeline
Source§impl ExecutionPipeline for NativeColumnarPipeline
impl ExecutionPipeline for NativeColumnarPipeline
Source§fn create_evaluator<'a>(
&self,
ctx: &'a ExecutionContext<'a>,
) -> CombinedExpressionEvaluator<'a>
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>
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:
- Extracts simple predicates from WHERE clause
- Applies SIMD filtering directly on column arrays
- Returns filtered columnar batch (converted to rows for output)
Source§fn apply_projection(
&self,
input: PipelineInput<'_>,
select_items: &[SelectItem],
ctx: &ExecutionContext<'_>,
) -> Result<PipelineOutput, ExecutorError>
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>
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:
- Extracts aggregate specifications from SELECT list
- For simple aggregates without GROUP BY: Uses SIMD reductions
- 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
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 apply_limit_offset(
&self,
input: PipelineOutput,
limit: Option<u64>,
offset: Option<u64>,
) -> Result<Vec<Row>, ExecutorError>
fn apply_limit_offset( &self, input: PipelineOutput, limit: Option<u64>, offset: Option<u64>, ) -> Result<Vec<Row>, ExecutorError>
Auto Trait Implementations§
impl Freeze for NativeColumnarPipeline
impl RefUnwindSafe for NativeColumnarPipeline
impl Send for NativeColumnarPipeline
impl Sync for NativeColumnarPipeline
impl Unpin for NativeColumnarPipeline
impl UnwindSafe for NativeColumnarPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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