Enum DslPlan
pub enum DslPlan {
Show 17 variants
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: Arc<Schema<DataType>>,
},
Select {
expr: Vec<Expr>,
input: Arc<DslPlan>,
options: ProjectionOptions,
},
GroupBy {
input: Arc<DslPlan>,
keys: Vec<Expr>,
aggs: Vec<Expr>,
apply: Option<(Arc<dyn DataFrameUdf>, Arc<Schema<DataType>>)>,
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: u32,
},
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>,
},
}
Available on crate feature
lazy
only.Variants§
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
Fields
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§
§impl DslPlan
impl DslPlan
pub fn compute_schema(&self) -> Result<Arc<Schema<DataType>>, PolarsError>
pub fn compute_schema(&self) -> Result<Arc<Schema<DataType>>, PolarsError>
Compute the schema. This requires conversion to [IR
] and type-resolving.
§impl DslPlan
impl DslPlan
pub fn describe(&self) -> Result<String, PolarsError>
pub fn describe_tree_format(&self) -> Result<String, PolarsError>
pub fn display(&self) -> Result<impl Display, PolarsError>
pub fn to_alp(self) -> Result<IRPlan, PolarsError>
Trait Implementations§
§impl<'de> Deserialize<'de> for DslPlan
impl<'de> Deserialize<'de> for DslPlan
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DslPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DslPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<'a> IntoIterator for &'a DslPlan
impl<'a> IntoIterator for &'a DslPlan
§impl Serialize for DslPlan
impl Serialize for DslPlan
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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