pub type Expr = Expr;Aliased Type§
pub enum Expr {
Show 27 variants
Element,
Alias(Arc<Expr>, PlSmallStr),
Column(PlSmallStr),
Selector(Selector),
Literal(LiteralValue),
DataTypeFunction(DataTypeFunction),
BinaryExpr {
left: Arc<Expr>,
op: Operator,
right: Arc<Expr>,
},
Cast {
expr: Arc<Expr>,
dtype: DataTypeExpr,
options: CastOptions,
},
Sort {
expr: Arc<Expr>,
options: SortOptions,
},
Gather {
expr: Arc<Expr>,
idx: Arc<Expr>,
returns_scalar: bool,
null_on_oob: bool,
},
SortBy {
expr: Arc<Expr>,
by: Vec<Expr>,
sort_options: SortMultipleOptions,
},
Agg(AggExpr),
Ternary {
predicate: Arc<Expr>,
truthy: Arc<Expr>,
falsy: Arc<Expr>,
},
Function {
input: Vec<Expr>,
function: FunctionExpr,
},
Explode {
input: Arc<Expr>,
options: ExplodeOptions,
},
Filter {
input: Arc<Expr>,
by: Arc<Expr>,
},
Over {
function: Arc<Expr>,
partition_by: Vec<Expr>,
order_by: Option<(Arc<Expr>, SortOptions)>,
mapping: WindowMapping,
},
Slice {
input: Arc<Expr>,
offset: Arc<Expr>,
length: Arc<Expr>,
},
KeepName(Arc<Expr>),
Len,
Field(Arc<[PlSmallStr]>),
AnonymousFunction {
input: Vec<Expr>,
function: LazySerde<SpecialEq<Arc<dyn AnonymousColumnsUdf>>>,
options: FunctionOptions,
fmt_str: Box<PlSmallStr>,
},
Eval {
expr: Arc<Expr>,
evaluation: Arc<Expr>,
variant: EvalVariant,
},
StructEval {
expr: Arc<Expr>,
evaluation: Vec<Expr>,
},
SubPlan(SpecialEq<Arc<DslPlan>>, Vec<(PlSmallStr, Expr)>),
RenameAlias {
function: RenameAliasFn,
expr: Arc<Expr>,
},
Display {
inputs: Vec<Expr>,
fmt_str: Box<PlSmallStr>,
},
}Variants§
Element
Values in a eval context.
Equivalent of pl.element().
Alias(Arc<Expr>, PlSmallStr)
Column(PlSmallStr)
Selector(Selector)
Literal(LiteralValue)
DataTypeFunction(DataTypeFunction)
BinaryExpr
Cast
Sort
Gather
SortBy
Agg(AggExpr)
Ternary
A ternary operation if true then “foo” else “bar”
Function
Explode
Filter
Over
Polars flavored window functions.
Slice
Fields
KeepName(Arc<Expr>)
Set root name as Alias
Len
Field(Arc<[PlSmallStr]>)
AnonymousFunction
Fields
§
function: LazySerde<SpecialEq<Arc<dyn AnonymousColumnsUdf>>>function to apply
§
options: FunctionOptions§
fmt_str: Box<PlSmallStr>used for formatting
Eval
Evaluates the evaluation expression on the output of the expr.
Consequently, expr is an input and evaluation is not and needs a different schema.
StructEval
Evaluates the evaluation expressions on the output of the expr.
Consequently, expr is an input and evaluation uses an extended schema that includes this input.
SubPlan(SpecialEq<Arc<DslPlan>>, Vec<(PlSmallStr, Expr)>)
SQL SubQueries Plan, Post-select expression and output-name of that expr
RenameAlias
Display
Not a real expression. This is meant as catch-all for IR expressions that are not supported by DSL.