Enum polars_plan::logical_plan::ALogicalPlan
source · pub enum ALogicalPlan {
Show 21 variants
AnonymousScan {
function: Arc<dyn AnonymousScan>,
file_info: FileInfo,
output_schema: Option<SchemaRef>,
predicate: Option<Node>,
options: AnonymousScanOptions,
},
Melt {
input: Node,
args: Arc<MeltArgs>,
schema: SchemaRef,
},
Slice {
input: Node,
offset: i64,
len: IdxSize,
},
Selection {
input: Node,
predicate: Node,
},
CsvScan {
path: PathBuf,
file_info: FileInfo,
output_schema: Option<SchemaRef>,
options: CsvParserOptions,
predicate: Option<Node>,
},
IpcScan {
path: PathBuf,
file_info: FileInfo,
output_schema: Option<SchemaRef>,
options: IpcScanOptionsInner,
predicate: Option<Node>,
},
ParquetScan {
path: PathBuf,
file_info: FileInfo,
output_schema: Option<SchemaRef>,
predicate: Option<Node>,
options: ParquetOptions,
cloud_options: Option<CloudOptions>,
},
DataFrameScan {
df: Arc<DataFrame>,
schema: SchemaRef,
output_schema: Option<SchemaRef>,
projection: Option<Arc<Vec<String>>>,
selection: Option<Node>,
},
Projection {
input: Node,
expr: Vec<Node>,
schema: SchemaRef,
},
LocalProjection {
expr: Vec<Node>,
input: Node,
schema: SchemaRef,
},
Sort {
input: Node,
by_column: Vec<Node>,
args: SortArguments,
},
Explode {
input: Node,
columns: Vec<String>,
schema: SchemaRef,
},
Cache {
input: Node,
id: usize,
count: usize,
},
Aggregate {
input: Node,
keys: Vec<Node>,
aggs: Vec<Node>,
schema: SchemaRef,
apply: Option<Arc<dyn DataFrameUdf>>,
maintain_order: bool,
options: GroupbyOptions,
},
Join {
input_left: Node,
input_right: Node,
schema: SchemaRef,
left_on: Vec<Node>,
right_on: Vec<Node>,
options: JoinOptions,
},
HStack {
input: Node,
exprs: Vec<Node>,
schema: SchemaRef,
},
Distinct {
input: Node,
options: DistinctOptions,
},
MapFunction {
input: Node,
function: FunctionNode,
},
Union {
inputs: Vec<Node>,
options: UnionOptions,
},
ExtContext {
input: Node,
contexts: Vec<Node>,
schema: SchemaRef,
},
FileSink {
input: Node,
payload: FileSinkOptions,
},
}
Expand description
ALogicalPlan is a representation of LogicalPlan with Nodes which are allocated in an Arena
Variants§
AnonymousScan
Melt
Slice
Selection
CsvScan
Available on crate feature
csv-file
only.IpcScan
Available on crate feature
ipc
only.ParquetScan
Available on crate feature
parquet
only.DataFrameScan
Fields
Projection
LocalProjection
Sort
Explode
Cache
Aggregate
Join
Fields
§
options: JoinOptions
HStack
Distinct
MapFunction
Union
ExtContext
FileSink
Implementations§
source§impl ALogicalPlan
impl ALogicalPlan
source§impl ALogicalPlan
impl ALogicalPlan
sourcepub fn with_exprs_and_input(
&self,
exprs: Vec<Node>,
inputs: Vec<Node>
) -> ALogicalPlan
pub fn with_exprs_and_input(
&self,
exprs: Vec<Node>,
inputs: Vec<Node>
) -> ALogicalPlan
Takes the expressions of an LP node and the inputs of that node and reconstruct
sourcepub fn copy_exprs(&self, container: &mut Vec<Node>)
pub fn copy_exprs(&self, container: &mut Vec<Node>)
Copy the exprs in this LP node to an existing container.
sourcepub fn copy_inputs<T>(&self, container: &mut T)where
T: PushNode,
pub fn copy_inputs<T>(&self, container: &mut T)where
T: PushNode,
Push inputs of the LP in of this node to an existing container. Most plans have typically one input. A join has two and a scan (CsvScan) or an in-memory DataFrame has none. A Union has multiple.
pub fn get_inputs(&self) -> Vec<Node> ⓘ
Trait Implementations§
source§impl Clone for ALogicalPlan
impl Clone for ALogicalPlan
source§fn clone(&self) -> ALogicalPlan
fn clone(&self) -> ALogicalPlan
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 more