pub enum AExpr {
Show 17 variants
Explode(Node),
Alias(Node, PlSmallStr),
Column(PlSmallStr),
Literal(LiteralValue),
BinaryExpr {
left: Node,
op: Operator,
right: Node,
},
Cast {
expr: Node,
dtype: 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: OpaqueColumnUdf,
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,
},
Slice {
input: Node,
offset: Node,
length: Node,
},
Len,
}
Expand description
IR expression node that is allocated in an Arena
.
Variants§
Explode(Node)
Alias(Node, PlSmallStr)
Column(PlSmallStr)
Literal(LiteralValue)
BinaryExpr
Cast
Sort
Gather
SortBy
Filter
Agg(IRAggExpr)
Ternary
AnonymousFunction
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
Slice
Len
Implementations§
Source§impl AExpr
impl AExpr
pub fn to_dtype( &self, schema: &Schema, ctx: Context, arena: &Arena<AExpr>, ) -> PolarsResult<DataType>
Sourcepub fn to_field(
&self,
schema: &Schema,
ctx: Context,
arena: &Arena<AExpr>,
) -> PolarsResult<Field>
pub fn to_field( &self, schema: &Schema, ctx: 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§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