pub enum Expr {
Column(String),
Literal(Scalar),
BinaryOp {
left: Box<Expr>,
op: Operator,
right: Box<Expr>,
},
UnaryOp {
op: UnaryOperator,
expr: Box<Expr>,
},
Agg {
func: AggFunc,
expr: Box<Expr>,
},
Function {
input: Box<Expr>,
function: ExprFunction,
},
ConcatStr {
inputs: Vec<Expr>,
separator: String,
null_behavior: ConcatStrNullBehavior,
},
Alias {
expr: Box<Expr>,
name: String,
},
Wildcard,
}Expand description
Expression AST and supporting enums.
Expression AST used by DataFrame and LazyFrame.
Variants§
Column(String)
Column reference.
Literal(Scalar)
Literal scalar value.
BinaryOp
Binary operator expression.
UnaryOp
Unary operator expression.
Agg
Aggregation expression (only valid under group_by().agg()).
Function
Namespace function expression.
ConcatStr
Row-wise concatenation of two or more UTF-8 expressions.
Fields
null_behavior: ConcatStrNullBehaviorDeclared treatment of null input values.
Alias
Expression alias (renames the resulting column).
Wildcard
Wildcard (*) that expands to all columns in projections.
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn concat_str(
inputs: Vec<Expr>,
separator: impl Into<String>,
null_behavior: ConcatStrNullBehavior,
) -> Result<Expr>
pub fn concat_str( inputs: Vec<Expr>, separator: impl Into<String>, null_behavior: ConcatStrNullBehavior, ) -> Result<Expr>
Construct a concat_str expression from two or more UTF-8 expressions.
Input arity is validated while the expression is built. Input type validation is performed against the source batch schema before any output batch is constructed.
Sourcepub fn alias(self, name: impl Into<String>) -> Expr
pub fn alias(self, name: impl Into<String>) -> Expr
Alias this expression (used to name output columns).
Sourcepub fn str(self) -> StringExpr
pub fn str(self) -> StringExpr
Enter the str.* expression namespace.
Sourcepub fn dt(self) -> DatetimeExpr
pub fn dt(self) -> DatetimeExpr
Enter the dt.* expression namespace.