Enum polars_plan::logical_plan::LogicalPlan
source · pub enum LogicalPlan {
Show 22 variants
AnonymousScan {
function: Arc<dyn AnonymousScan>,
file_info: FileInfo,
predicate: Option<Expr>,
options: AnonymousScanOptions,
},
Selection {
input: Box<LogicalPlan>,
predicate: Expr,
},
Cache {
input: Box<LogicalPlan>,
id: usize,
count: usize,
},
CsvScan {
path: PathBuf,
file_info: FileInfo,
options: CsvParserOptions,
predicate: Option<Expr>,
},
ParquetScan {
path: PathBuf,
file_info: FileInfo,
predicate: Option<Expr>,
options: ParquetOptions,
cloud_options: Option<CloudOptions>,
},
IpcScan {
path: PathBuf,
file_info: FileInfo,
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,
},
FileSink {
input: Box<LogicalPlan>,
payload: FileSinkOptions,
},
}
Variants§
AnonymousScan
Selection
Filter on a boolean mask
Cache
Cache the input at this point in the LP
CsvScan
Available on crate feature
csv-file
only.Scan a CSV file
ParquetScan
Available on crate feature
parquet
only.Scan a Parquet file
IpcScan
Available on crate feature
ipc
only.DataFrameScan
Fields
In memory DataFrame
LocalProjection
Projection
Column selection
Aggregate
Groupby aggregation
Join
Join operation
HStack
Adding columns to the table without a Join
Distinct
Remove duplicates from the table
Sort
Sort the table
Explode
An explode operation
Slice
Slice the table
Melt
A Melt operation
MapFunction
A (User Defined) Function
Union
Error
Catches errors and throws them later
ExtContext
This allows expressions to access other tables
FileSink
Implementations§
source§impl LogicalPlan
impl LogicalPlan
sourcepub fn dot(
&self,
acc_str: &mut String,
id: (usize, usize),
prev_node: DotNode<'_>,
id_map: &mut PlHashMap<String, String>
) -> Result
pub fn dot(
&self,
acc_str: &mut String,
id: (usize, usize),
prev_node: DotNode<'_>,
id_map: &mut PlHashMap<String, String>
) -> Result
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§
source§impl Clone for LogicalPlan
impl Clone for LogicalPlan
source§fn clone(&self) -> LogicalPlan
fn clone(&self) -> LogicalPlan
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LogicalPlan
impl Debug for LogicalPlan
source§impl Default for LogicalPlan
impl Default for LogicalPlan
source§impl From<LogicalPlan> for LogicalPlanBuilder
impl From<LogicalPlan> for LogicalPlanBuilder
source§fn from(lp: LogicalPlan) -> Self
fn from(lp: LogicalPlan) -> Self
Converts to this type from the input type.