Enum datafusion::logical::Expr [−][src]
pub enum Expr {
Column(usize),
Literal(ScalarValue),
BinaryExpr {
left: Rc<Expr>,
op: Operator,
right: Rc<Expr>,
},
IsNotNull(Rc<Expr>),
IsNull(Rc<Expr>),
Cast {
expr: Rc<Expr>,
data_type: DataType,
},
Sort {
expr: Rc<Expr>,
asc: bool,
},
ScalarFunction {
name: String,
args: Vec<Expr>,
return_type: DataType,
},
AggregateFunction {
name: String,
args: Vec<Expr>,
return_type: DataType,
},
}Relation Expression
Variants
Column(usize)index into a value within the row or complex value
Literal(ScalarValue)literal value
BinaryExprbinary expression e.g. "age > 21"
Fields of BinaryExpr
left: Rc<Expr> | |
op: Operator | |
right: Rc<Expr> |
IsNotNull(Rc<Expr>)unary IS NOT NULL
IsNull(Rc<Expr>)unary IS NULL
Castcast a value to a different type
Fields of Cast
expr: Rc<Expr> | |
data_type: DataType |
Sortsort expression
Fields of Sort
expr: Rc<Expr> | |
asc: bool |
ScalarFunctionscalar function
Fields of ScalarFunction
name: String | |
args: Vec<Expr> | |
return_type: DataType |
AggregateFunctionaggregate function
Fields of AggregateFunction
name: String | |
args: Vec<Expr> | |
return_type: DataType |
Methods
impl Expr[src]
impl Exprpub fn get_type(&self, schema: &Schema) -> DataType[src]
pub fn get_type(&self, schema: &Schema) -> DataTypepub fn cast_to(
&self,
cast_to_type: &DataType,
schema: &Schema
) -> Result<Expr, String>[src]
pub fn cast_to(
&self,
cast_to_type: &DataType,
schema: &Schema
) -> Result<Expr, String>pub fn eq(&self, other: &Expr) -> Expr[src]
pub fn eq(&self, other: &Expr) -> Exprpub fn not_eq(&self, other: &Expr) -> Expr[src]
pub fn not_eq(&self, other: &Expr) -> Exprpub fn gt(&self, other: &Expr) -> Expr[src]
pub fn gt(&self, other: &Expr) -> Exprpub fn gt_eq(&self, other: &Expr) -> Expr[src]
pub fn gt_eq(&self, other: &Expr) -> Exprpub fn lt(&self, other: &Expr) -> Expr[src]
pub fn lt(&self, other: &Expr) -> Exprpub fn lt_eq(&self, other: &Expr) -> Expr[src]
pub fn lt_eq(&self, other: &Expr) -> ExprTrait Implementations
impl Clone for Expr[src]
impl Clone for Exprfn clone(&self) -> Expr[src]
fn clone(&self) -> ExprReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl PartialEq for Expr[src]
impl PartialEq for Exprfn eq(&self, other: &Expr) -> bool[src]
fn eq(&self, other: &Expr) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Expr) -> bool[src]
fn ne(&self, other: &Expr) -> boolThis method tests for !=.
impl Debug for Expr[src]
impl Debug for Expr