pub enum DslPlan {
Show 18 variants
PythonScan {
options: PythonOptions,
},
Filter {
input: Arc<DslPlan>,
predicate: Expr,
},
Cache {
input: Arc<DslPlan>,
id: usize,
},
Scan {
sources: ScanSources,
file_info: Option<FileInfo>,
file_options: FileScanOptions,
scan_type: FileScan,
cached_ir: Arc<Mutex<Option<IR>>>,
},
DataFrameScan {
df: Arc<DataFrame>,
schema: SchemaRef,
},
Select {
expr: Vec<Expr>,
input: Arc<DslPlan>,
options: ProjectionOptions,
},
GroupBy {
input: Arc<DslPlan>,
keys: Vec<Expr>,
aggs: Vec<Expr>,
apply: Option<(Arc<dyn DataFrameUdf>, SchemaRef)>,
maintain_order: bool,
options: Arc<GroupbyOptions>,
},
Join {
input_left: Arc<DslPlan>,
input_right: Arc<DslPlan>,
left_on: Vec<Expr>,
right_on: Vec<Expr>,
predicates: Vec<Expr>,
options: Arc<JoinOptions>,
},
HStack {
input: Arc<DslPlan>,
exprs: Vec<Expr>,
options: ProjectionOptions,
},
Distinct {
input: Arc<DslPlan>,
options: DistinctOptionsDSL,
},
Sort {
input: Arc<DslPlan>,
by_column: Vec<Expr>,
slice: Option<(i64, usize)>,
sort_options: SortMultipleOptions,
},
Slice {
input: Arc<DslPlan>,
offset: i64,
len: IdxSize,
},
MapFunction {
input: Arc<DslPlan>,
function: DslFunction,
},
Union {
inputs: Vec<DslPlan>,
args: UnionArgs,
},
HConcat {
inputs: Vec<DslPlan>,
options: HConcatOptions,
},
ExtContext {
input: Arc<DslPlan>,
contexts: Vec<DslPlan>,
},
Sink {
input: Arc<DslPlan>,
payload: SinkType,
},
IR {
node: Option<Node>,
version: u32,
dsl: Arc<DslPlan>,
},
}
Variants§
PythonScan
Available on crate feature
python
only.Fields
§
options: PythonOptions
Filter
Filter on a boolean mask
Cache
Cache the input at this point in the LP
Scan
DataFrameScan
In memory DataFrame
Select
Polars’ select
operation, this can mean projection, but also full data access.
GroupBy
Groupby aggregation
Join
Join operation
Fields
§
options: Arc<JoinOptions>
HStack
Adding columns to the table without a Join
Distinct
Remove duplicates from the table
Sort
Sort the table
Fields
§
sort_options: SortMultipleOptions
Slice
Slice the table
MapFunction
A (User Defined) Function
Union
Vertical concatenation
HConcat
Horizontal concatenation of multiple plans
ExtContext
This allows expressions to access other tables
Sink
IR
Implementations§
Source§impl DslPlan
impl DslPlan
Sourcepub fn compute_schema(&self) -> PolarsResult<SchemaRef>
pub fn compute_schema(&self) -> PolarsResult<SchemaRef>
Compute the schema. This requires conversion to IR
and type-resolving.
Source§impl DslPlan
impl DslPlan
pub fn describe(&self) -> PolarsResult<String>
pub fn describe_tree_format(&self) -> PolarsResult<String>
pub fn display(&self) -> PolarsResult<impl Display>
pub fn to_alp(self) -> PolarsResult<IRPlan>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DslPlan
impl<'de> Deserialize<'de> for DslPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<DslPlan> for DslBuilder
impl From<DslPlan> for DslBuilder
Auto Trait Implementations§
impl !Freeze for DslPlan
impl !RefUnwindSafe for DslPlan
impl Send for DslPlan
impl Sync for DslPlan
impl Unpin for DslPlan
impl !UnwindSafe for DslPlan
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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