pub enum LogicalPlan {
Show 22 variants AnonymousScan { function: Arc<dyn AnonymousScan>, schema: SchemaRef, predicate: Option<Expr>, options: AnonymousScanOptions, }, PythonScan { options: PythonOptions, }, Selection { input: Box<LogicalPlan>, predicate: Expr, }, Cache { input: Box<LogicalPlan>, id: usize, count: usize, }, CsvScan { path: PathBuf, schema: SchemaRef, options: CsvParserOptions, predicate: Option<Expr>, }, ParquetScan { path: PathBuf, schema: SchemaRef, predicate: Option<Expr>, options: ParquetOptions, }, IpcScan { path: PathBuf, schema: SchemaRef, options: IpcScanOptionsInner, predicate: Option<Expr>, }, DataFrameScan { df: Arc<DataFrame>, schema: SchemaRef, output_schema: Option<SchemaRef>, projection: Option<Arc<Vec<String>>>, selection: Option<Expr>, }, LocalProjection { expr: Vec<Expr>, input: Box<LogicalPlan>, schema: SchemaRef, }, Projection { expr: Vec<Expr>, input: Box<LogicalPlan>, schema: SchemaRef, }, Aggregate { input: Box<LogicalPlan>, keys: Arc<Vec<Expr>>, aggs: Vec<Expr>, schema: SchemaRef, apply: Option<Arc<dyn DataFrameUdf>>, maintain_order: bool, options: GroupbyOptions, }, Join { input_left: Box<LogicalPlan>, input_right: Box<LogicalPlan>, schema: SchemaRef, left_on: Vec<Expr>, right_on: Vec<Expr>, options: JoinOptions, }, HStack { input: Box<LogicalPlan>, exprs: Vec<Expr>, schema: SchemaRef, }, Distinct { input: Box<LogicalPlan>, options: DistinctOptions, }, Sort { input: Box<LogicalPlan>, by_column: Vec<Expr>, args: SortArguments, }, Explode { input: Box<LogicalPlan>, columns: Vec<String>, schema: SchemaRef, }, Slice { input: Box<LogicalPlan>, offset: i64, len: IdxSize, }, Melt { input: Box<LogicalPlan>, args: Arc<MeltArgs>, schema: SchemaRef, }, MapFunction { input: Box<LogicalPlan>, function: FunctionNode, }, Union { inputs: Vec<LogicalPlan>, options: UnionOptions, }, Error { input: Box<LogicalPlan>, err: Arc<Mutex<Option<PolarsError>>>, }, ExtContext { input: Box<LogicalPlan>, contexts: Vec<LogicalPlan>, schema: SchemaRef, },
}

Variants

AnonymousScan

Fields

function: Arc<dyn AnonymousScan>
schema: SchemaRef
predicate: Option<Expr>

PythonScan

Fields

options: PythonOptions

Selection

Fields

input: Box<LogicalPlan>
predicate: Expr

Filter on a boolean mask

Cache

Fields

input: Box<LogicalPlan>
id: usize
count: usize

Cache the input at this point in the LP

CsvScan

Fields

path: PathBuf
schema: SchemaRef
predicate: Option<Expr>

Filters at the scan level

Scan a CSV file

ParquetScan

Fields

path: PathBuf
schema: SchemaRef
predicate: Option<Expr>
options: ParquetOptions
Available on crate feature parquet only.

Scan a Parquet file

IpcScan

Fields

path: PathBuf
schema: SchemaRef
predicate: Option<Expr>
Available on crate feature ipc only.

DataFrameScan

Fields

schema: SchemaRef
output_schema: Option<SchemaRef>
projection: Option<Arc<Vec<String>>>
selection: Option<Expr>

In memory DataFrame

LocalProjection

Fields

expr: Vec<Expr>
input: Box<LogicalPlan>
schema: SchemaRef

Projection

Fields

expr: Vec<Expr>
input: Box<LogicalPlan>
schema: SchemaRef

Column selection

Aggregate

Fields

input: Box<LogicalPlan>
keys: Arc<Vec<Expr>>
aggs: Vec<Expr>
schema: SchemaRef
apply: Option<Arc<dyn DataFrameUdf>>
maintain_order: bool
options: GroupbyOptions

Groupby aggregation

Join

Fields

input_left: Box<LogicalPlan>
input_right: Box<LogicalPlan>
schema: SchemaRef
left_on: Vec<Expr>
right_on: Vec<Expr>
options: JoinOptions

Join operation

HStack

Fields

input: Box<LogicalPlan>
exprs: Vec<Expr>
schema: SchemaRef

Adding columns to the table without a Join

Distinct

Fields

input: Box<LogicalPlan>
options: DistinctOptions

Remove duplicates from the table

Sort

Fields

input: Box<LogicalPlan>
by_column: Vec<Expr>

Sort the table

Explode

Fields

input: Box<LogicalPlan>
columns: Vec<String>
schema: SchemaRef

An explode operation

Slice

Fields

input: Box<LogicalPlan>
offset: i64
len: IdxSize

Slice the table

Melt

Fields

input: Box<LogicalPlan>
args: Arc<MeltArgs>
schema: SchemaRef

A Melt operation

MapFunction

Fields

input: Box<LogicalPlan>
function: FunctionNode

A (User Defined) Function

Union

Fields

inputs: Vec<LogicalPlan>
options: UnionOptions

Error

Fields

input: Box<LogicalPlan>

Catches errors and throws them later

ExtContext

Fields

input: Box<LogicalPlan>
contexts: Vec<LogicalPlan>
schema: SchemaRef

This allows expressions to access other tables

Implementations

Available on crate feature dot_diagram only.
Arguments

id - (branch, id) Used to make sure that the dot boxes are distinct. branch is an id per join/union branch id is incremented by the depth traversal of the tree.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.