[][src]Enum datafusion::logicalplan::LogicalPlan

pub enum LogicalPlan {
    Projection {
        expr: Vec<Expr>,
        input: Arc<LogicalPlan>,
        schema: Arc<Schema>,
    },
    Selection {
        expr: Expr,
        input: Arc<LogicalPlan>,
    },
    Aggregate {
        input: Arc<LogicalPlan>,
        group_expr: Vec<Expr>,
        aggr_expr: Vec<Expr>,
        schema: Arc<Schema>,
    },
    Sort {
        expr: Vec<Expr>,
        input: Arc<LogicalPlan>,
        schema: Arc<Schema>,
    },
    TableScan {
        schema_name: String,
        table_name: String,
        schema: Arc<Schema>,
        projection: Option<Vec<usize>>,
    },
    EmptyRelation {
        schema: Arc<Schema>,
    },
    Limit {
        expr: Expr,
        input: Arc<LogicalPlan>,
        schema: Arc<Schema>,
    },
}

The LogicalPlan represents different types of relations (such as Projection, Selection, etc) and can be created by the SQL query planner and the DataFrame API.

Variants

Projection

A Projection (essentially a SELECT with an expression list)

Fields of Projection

expr: Vec<Expr>

The list of expressions

input: Arc<LogicalPlan>

The incoming logic plan

schema: Arc<Schema>

The schema description

Selection

A Selection (essentially a WHERE clause with a predicate expression)

Fields of Selection

expr: Expr

The expression

input: Arc<LogicalPlan>

The incoming logic plan

Aggregate

Represents a list of aggregate expressions with optional grouping expressions

Fields of Aggregate

input: Arc<LogicalPlan>

The incoming logic plan

group_expr: Vec<Expr>

Grouping expressions

aggr_expr: Vec<Expr>

Aggregate expressions

schema: Arc<Schema>

The schema description

Sort

Represents a list of sort expressions to be applied to a relation

Fields of Sort

expr: Vec<Expr>

The sort expressions

input: Arc<LogicalPlan>

The incoming logic plan

schema: Arc<Schema>

The schema description

TableScan

A table scan against a table that has been registered on a context

Fields of TableScan

schema_name: String

The name of the schema

table_name: String

The name of the table

schema: Arc<Schema>

The schema description

projection: Option<Vec<usize>>

Optional column indices to use as a projection

EmptyRelation

An empty relation with an empty schema

Fields of EmptyRelation

schema: Arc<Schema>

The schema description

Limit

Represents the maximum number of records to return

Fields of Limit

expr: Expr

The expression

input: Arc<LogicalPlan>

The logical plan

schema: Arc<Schema>

The schema description

Methods

impl LogicalPlan[src]

pub fn schema(&self) -> &Arc<Schema>[src]

Get a reference to the logical plan's schema

Trait Implementations

impl Clone for LogicalPlan[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for LogicalPlan[src]

impl<'de> Deserialize<'de> for LogicalPlan[src]

impl Serialize for LogicalPlan[src]

Auto Trait Implementations

impl Send for LogicalPlan

impl Sync for LogicalPlan

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> FromCast for T

impl<T, U> Cast for T where
    U: FromCast<T>, 

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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