Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
datafusion::logicalplan::LogicalPlan - Rust
[go: Go Back, main page]

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

pub enum LogicalPlan {
    Projection {
        expr: Vec<Expr>,
        input: Box<LogicalPlan>,
        schema: Box<Schema>,
    },
    Selection {
        expr: Expr,
        input: Box<LogicalPlan>,
    },
    Aggregate {
        input: Box<LogicalPlan>,
        group_expr: Vec<Expr>,
        aggr_expr: Vec<Expr>,
        schema: Box<Schema>,
    },
    Sort {
        expr: Vec<Expr>,
        input: Box<LogicalPlan>,
        schema: Box<Schema>,
    },
    TableScan {
        schema_name: String,
        table_name: String,
        table_schema: Box<Schema>,
        projection: Option<Vec<usize>>,
        projected_schema: Box<Schema>,
    },
    InMemoryScan {
        data: Vec<Vec<RecordBatch>>,
        schema: Box<Schema>,
        projection: Option<Vec<usize>>,
        projected_schema: Box<Schema>,
    },
    ParquetScan {
        path: String,
        schema: Box<Schema>,
        projection: Option<Vec<usize>>,
        projected_schema: Box<Schema>,
    },
    CsvScan {
        path: String,
        schema: Box<Schema>,
        has_header: bool,
        delimiter: Option<u8>,
        projection: Option<Vec<usize>>,
        projected_schema: Box<Schema>,
    },
    EmptyRelation {
        schema: Box<Schema>,
    },
    Limit {
        n: usize,
        input: Box<LogicalPlan>,
        schema: Box<Schema>,
    },
    CreateExternalTable {
        schema: Box<Schema>,
        name: String,
        location: String,
        file_type: FileType,
        has_header: bool,
    },
}

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: Box<LogicalPlan>

The incoming logic plan

schema: Box<Schema>

The schema description

Selection

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

Fields of Selection

expr: Expr

The expression

input: Box<LogicalPlan>

The incoming logic plan

Aggregate

Represents a list of aggregate expressions with optional grouping expressions

Fields of Aggregate

input: Box<LogicalPlan>

The incoming logic plan

group_expr: Vec<Expr>

Grouping expressions

aggr_expr: Vec<Expr>

Aggregate expressions

schema: Box<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: Box<LogicalPlan>

The incoming logic plan

schema: Box<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

table_schema: Box<Schema>

The schema of the CSV file(s)

projection: Option<Vec<usize>>

Optional column indices to use as a projection

projected_schema: Box<Schema>

The projected schema

InMemoryScan

A table scan against a vector of record batches

Fields of InMemoryScan

data: Vec<Vec<RecordBatch>>

Record batch partitions

schema: Box<Schema>

The schema of the record batches

projection: Option<Vec<usize>>

Optional column indices to use as a projection

projected_schema: Box<Schema>

The projected schema

ParquetScan

A table scan against a Parquet data source

Fields of ParquetScan

path: String

The path to the files

schema: Box<Schema>

The schema of the Parquet file(s)

projection: Option<Vec<usize>>

Optional column indices to use as a projection

projected_schema: Box<Schema>

The projected schema

CsvScan

A table scan against a CSV data source

Fields of CsvScan

path: String

The path to the files

schema: Box<Schema>

The underlying table schema

has_header: bool

Whether the CSV file(s) have a header containing column names

delimiter: Option<u8>

An optional column delimiter. Defaults to b','

projection: Option<Vec<usize>>

Optional column indices to use as a projection

projected_schema: Box<Schema>

The projected schema

EmptyRelation

An empty relation with an empty schema

Fields of EmptyRelation

schema: Box<Schema>

The schema description

Limit

Represents the maximum number of records to return

Fields of Limit

n: usize

The limit

input: Box<LogicalPlan>

The logical plan

schema: Box<Schema>

The schema description

CreateExternalTable

Represents a create external table expression.

Fields of CreateExternalTable

schema: Box<Schema>

The table schema

name: String

The table name

location: String

The physical location

file_type: FileType

The file type of physical file

has_header: bool

Whether the CSV file contains a header

Implementations

impl LogicalPlan[src]

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

Get a reference to the logical plan's schema

Trait Implementations

impl Clone for LogicalPlan[src]

impl Debug for LogicalPlan[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,