Skip to main content

Step

Enum Step 

Source
pub enum Step {
    Scan {
        table: String,
        alias: Option<String>,
        projections: Vec<Projection>,
        predicate: Option<Expr>,
        dependencies: Vec<StepId>,
    },
    Filter {
        predicate: Expr,
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    Project {
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    Aggregate {
        group_by: Vec<Expr>,
        aggregations: Vec<Projection>,
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    Sort {
        order_by: Vec<OrderByItem>,
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    Join {
        join_type: JoinType,
        condition: Option<Expr>,
        using_columns: Vec<String>,
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    Limit {
        limit: Option<Expr>,
        offset: Option<Expr>,
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    SetOperation {
        op: SetOperationType,
        all: bool,
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
    Distinct {
        projections: Vec<Projection>,
        dependencies: Vec<StepId>,
    },
}
Expand description

A single step in the logical execution plan.

Variants§

§

Scan

Full table scan with optional filter pushdown.

Fields

§table: String

Fully-qualified table name.

§alias: Option<String>

Alias for the table (if any).

§projections: Vec<Projection>

Projected columns.

§predicate: Option<Expr>

Predicate pushed down to the scan.

§dependencies: Vec<StepId>

IDs of steps this step depends on (always empty for a scan).

§

Filter

Filter (WHERE / HAVING) applied to its input.

Fields

§predicate: Expr

The filter predicate.

§projections: Vec<Projection>

Projected columns.

§dependencies: Vec<StepId>

The single input step.

§

Project

Projection (SELECT list evaluation).

Fields

§projections: Vec<Projection>

Output projections.

§dependencies: Vec<StepId>

The single input step.

§

Aggregate

Aggregation (GROUP BY + aggregate functions).

Fields

§group_by: Vec<Expr>

GROUP BY keys.

§aggregations: Vec<Projection>

Aggregate expressions (COUNT, SUM, etc.).

§projections: Vec<Projection>

Projected output columns.

§dependencies: Vec<StepId>

The single input step.

§

Sort

Sort (ORDER BY).

Fields

§order_by: Vec<OrderByItem>

Order-by items.

§projections: Vec<Projection>

Projected columns (pass-through).

§dependencies: Vec<StepId>

The single input step.

§

Join

Join two inputs.

Fields

§join_type: JoinType

Type of join.

§condition: Option<Expr>

Join condition (ON clause).

§using_columns: Vec<String>

USING columns (if specified instead of ON).

§projections: Vec<Projection>

Projected columns.

§dependencies: Vec<StepId>

Two input steps: [left, right].

§

Limit

LIMIT / OFFSET.

Fields

§limit: Option<Expr>

Row limit.

§offset: Option<Expr>

Row offset.

§projections: Vec<Projection>

Projected columns (pass-through).

§dependencies: Vec<StepId>

The single input step.

§

SetOperation

UNION / INTERSECT / EXCEPT.

Fields

§op: SetOperationType

The kind of set operation.

§all: bool

Whether ALL (no deduplication).

§projections: Vec<Projection>

Projected columns from the combined result.

§dependencies: Vec<StepId>

Two input steps: [left, right].

§

Distinct

DISTINCT elimination.

Fields

§projections: Vec<Projection>

Projected columns.

§dependencies: Vec<StepId>

The single input step.

Implementations§

Source§

impl Step

Source

pub fn dependencies(&self) -> &[StepId]

Returns the list of step IDs this step depends on.

Source

pub fn projections(&self) -> &[Projection]

Returns the projected columns of this step.

Source

pub fn kind(&self) -> &'static str

A short human-readable label for the step type.

Trait Implementations§

Source§

impl Clone for Step

Source§

fn clone(&self) -> Step

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Step

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Step

Source§

fn eq(&self, other: &Step) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Step

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.