Enum polars_lazy::prelude::LogicalPlan
source · pub enum LogicalPlan {
Show 22 variants
AnonymousScan {
function: Arc<dyn AnonymousScan + 'static>,
file_info: FileInfo,
predicate: Option<Expr>,
options: AnonymousScanOptions,
},
Selection {
input: Box<LogicalPlan, Global>,
predicate: Expr,
},
Cache {
input: Box<LogicalPlan, Global>,
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: Arc<Schema>,
output_schema: Option<Arc<Schema>>,
projection: Option<Arc<Vec<String, Global>>>,
selection: Option<Expr>,
},
LocalProjection {
expr: Vec<Expr, Global>,
input: Box<LogicalPlan, Global>,
schema: Arc<Schema>,
},
Projection {
expr: Vec<Expr, Global>,
input: Box<LogicalPlan, Global>,
schema: Arc<Schema>,
},
Aggregate {
input: Box<LogicalPlan, Global>,
keys: Arc<Vec<Expr, Global>>,
aggs: Vec<Expr, Global>,
schema: Arc<Schema>,
apply: Option<Arc<dyn DataFrameUdf + 'static>>,
maintain_order: bool,
options: GroupbyOptions,
},
Join {
input_left: Box<LogicalPlan, Global>,
input_right: Box<LogicalPlan, Global>,
schema: Arc<Schema>,
left_on: Vec<Expr, Global>,
right_on: Vec<Expr, Global>,
options: JoinOptions,
},
HStack {
input: Box<LogicalPlan, Global>,
exprs: Vec<Expr, Global>,
schema: Arc<Schema>,
},
Distinct {
input: Box<LogicalPlan, Global>,
options: DistinctOptions,
},
Sort {
input: Box<LogicalPlan, Global>,
by_column: Vec<Expr, Global>,
args: SortArguments,
},
Explode {
input: Box<LogicalPlan, Global>,
columns: Vec<String, Global>,
schema: Arc<Schema>,
},
Slice {
input: Box<LogicalPlan, Global>,
offset: i64,
len: u32,
},
Melt {
input: Box<LogicalPlan, Global>,
args: Arc<MeltArgs>,
schema: Arc<Schema>,
},
MapFunction {
input: Box<LogicalPlan, Global>,
function: FunctionNode,
},
Union {
inputs: Vec<LogicalPlan, Global>,
options: UnionOptions,
},
Error {
input: Box<LogicalPlan, Global>,
err: Arc<Mutex<Option<PolarsError>>>,
},
ExtContext {
input: Box<LogicalPlan, Global>,
contexts: Vec<LogicalPlan, Global>,
schema: Arc<Schema>,
},
FileSink {
input: Box<LogicalPlan, Global>,
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
Fields
§
input: Box<LogicalPlan, Global>
§
apply: Option<Arc<dyn DataFrameUdf + 'static>>
§
options: GroupbyOptions
Groupby aggregation
Join
Fields
§
input_left: Box<LogicalPlan, Global>
§
input_right: Box<LogicalPlan, Global>
§
options: JoinOptions
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 HashMap<String, String, RandomState, Global>
) -> Result<(), Error>
pub fn dot(
&self,
acc_str: &mut String,
id: (usize, usize),
prev_node: DotNode<'_>,
id_map: &mut HashMap<String, String, RandomState, Global>
) -> Result<(), Error>
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§fn default() -> LogicalPlan
fn default() -> LogicalPlan
Returns the “default value” for a type. Read more
source§impl From<LogicalPlan> for LazyFrame
impl From<LogicalPlan> for LazyFrame
source§fn from(plan: LogicalPlan) -> Self
fn from(plan: LogicalPlan) -> Self
Converts to this type from the input type.