Enum polars_plan::plans::IR
source · pub enum IR {
Show 20 variants
PythonScan {
options: PythonOptions,
predicate: Option<ExprIR>,
},
Slice {
input: Node,
offset: i64,
len: IdxSize,
},
Filter {
input: Node,
predicate: ExprIR,
},
Scan {
paths: Arc<[PathBuf]>,
file_info: FileInfo,
hive_parts: Option<Arc<[HivePartitions]>>,
predicate: Option<ExprIR>,
output_schema: Option<SchemaRef>,
scan_type: FileScan,
file_options: FileScanOptions,
},
DataFrameScan {
df: Arc<DataFrame>,
schema: SchemaRef,
output_schema: Option<SchemaRef>,
filter: Option<ExprIR>,
},
SimpleProjection {
input: Node,
columns: SchemaRef,
},
Reduce {
input: Node,
exprs: Vec<ExprIR>,
schema: SchemaRef,
},
Select {
input: Node,
expr: Vec<ExprIR>,
schema: SchemaRef,
options: ProjectionOptions,
},
Sort {
input: Node,
by_column: Vec<ExprIR>,
slice: Option<(i64, usize)>,
sort_options: SortMultipleOptions,
},
Cache {
input: Node,
id: usize,
cache_hits: u32,
},
GroupBy {
input: Node,
keys: Vec<ExprIR>,
aggs: Vec<ExprIR>,
schema: SchemaRef,
apply: Option<Arc<dyn DataFrameUdf>>,
maintain_order: bool,
options: Arc<GroupbyOptions>,
},
Join {
input_left: Node,
input_right: Node,
schema: SchemaRef,
left_on: Vec<ExprIR>,
right_on: Vec<ExprIR>,
options: Arc<JoinOptions>,
},
HStack {
input: Node,
exprs: Vec<ExprIR>,
schema: SchemaRef,
options: ProjectionOptions,
},
Distinct {
input: Node,
options: DistinctOptions,
},
MapFunction {
input: Node,
function: FunctionNode,
},
Union {
inputs: Vec<Node>,
options: UnionOptions,
},
HConcat {
inputs: Vec<Node>,
schema: SchemaRef,
options: HConcatOptions,
},
ExtContext {
input: Node,
contexts: Vec<Node>,
schema: SchemaRef,
},
Sink {
input: Node,
payload: SinkType,
},
Invalid,
}
Expand description
Variants§
PythonScan
Available on crate feature
python
only.Slice
Filter
Scan
Fields
§
hive_parts: Option<Arc<[HivePartitions]>>
§
file_options: FileScanOptions
generic options that can be used for all file types.
DataFrameScan
SimpleProjection
Reduce
Select
Sort
Fields
§
sort_options: SortMultipleOptions
Cache
GroupBy
Join
Fields
§
options: Arc<JoinOptions>
HStack
Distinct
MapFunction
Union
HConcat
ExtContext
Sink
Invalid
Implementations§
source§impl IR
impl IR
sourcepub fn with_exprs_and_input(&self, exprs: Vec<ExprIR>, inputs: Vec<Node>) -> IR
pub fn with_exprs_and_input(&self, exprs: Vec<ExprIR>, inputs: Vec<Node>) -> IR
Takes the expressions of an LP node and the inputs of that node and reconstruct
sourcepub fn copy_exprs(&self, container: &mut Vec<ExprIR>)
pub fn copy_exprs(&self, container: &mut Vec<ExprIR>)
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) -> UnitVec<Node>
pub fn get_inputs_vec(&self) -> Vec<Node>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for IR
impl !RefUnwindSafe for IR
impl Send for IR
impl Sync for IR
impl Unpin for IR
impl !UnwindSafe for IR
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more