Enum polars_plan::plans::AExpr
source · pub enum AExpr {
Show 19 variants
Explode(Node),
Alias(Node, ColumnName),
Column(ColumnName),
Literal(LiteralValue),
BinaryExpr {
left: Node,
op: Operator,
right: Node,
},
Cast {
expr: Node,
data_type: DataType,
options: CastOptions,
},
Sort {
expr: Node,
options: SortOptions,
},
Gather {
expr: Node,
idx: Node,
returns_scalar: bool,
},
SortBy {
expr: Node,
by: Vec<Node>,
sort_options: SortMultipleOptions,
},
Filter {
input: Node,
by: Node,
},
Agg(IRAggExpr),
Ternary {
predicate: Node,
truthy: Node,
falsy: Node,
},
AnonymousFunction {
input: Vec<ExprIR>,
function: SpecialEq<Arc<dyn SeriesUdf>>,
output_type: GetOutput,
options: FunctionOptions,
},
Function {
input: Vec<ExprIR>,
function: FunctionExpr,
options: FunctionOptions,
},
Window {
function: Node,
partition_by: Vec<Node>,
order_by: Option<(Node, SortOptions)>,
options: WindowType,
},
Wildcard,
Slice {
input: Node,
offset: Node,
length: Node,
},
Len,
Nth(i64),
}
Expand description
IR expression node that is allocated in an Arena
.
Variants§
Explode(Node)
Alias(Node, ColumnName)
Column(ColumnName)
Literal(LiteralValue)
BinaryExpr
Cast
Sort
Gather
SortBy
Filter
Agg(IRAggExpr)
Ternary
AnonymousFunction
Fields
§
options: FunctionOptions
Function
Fields
§
input: Vec<ExprIR>
Function arguments
Some functions rely on aliases,
for instance assignment of struct fields.
Therefor we need [ExprIr]
.
§
function: FunctionExpr
function to apply
§
options: FunctionOptions
Window
Wildcard
Slice
Len
Nth(i64)
Implementations§
source§impl AExpr
impl AExpr
pub fn to_dtype( &self, schema: &Schema, ctxt: Context, arena: &Arena<AExpr>, ) -> PolarsResult<DataType>
sourcepub fn to_field(
&self,
schema: &Schema,
ctxt: Context,
arena: &Arena<AExpr>,
) -> PolarsResult<Field>
pub fn to_field( &self, schema: &Schema, ctxt: Context, arena: &Arena<AExpr>, ) -> PolarsResult<Field>
Get Field result of the expression. The schema is the input data.
sourcepub fn to_field_impl(
&self,
schema: &Schema,
arena: &Arena<AExpr>,
nested: &mut u8,
) -> PolarsResult<Field>
pub fn to_field_impl( &self, schema: &Schema, arena: &Arena<AExpr>, nested: &mut u8, ) -> PolarsResult<Field>
Get Field result of the expression. The schema is the input data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AExpr
impl !RefUnwindSafe for AExpr
impl Send for AExpr
impl Sync for AExpr
impl Unpin for AExpr
impl !UnwindSafe for AExpr
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