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
BinaryExpr
binary 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
Cast
cast a value to a different type
Fields of Cast
expr: Rc<Expr> | |
data_type: DataType |
Sort
sort expression
Fields of Sort
expr: Rc<Expr> | |
asc: bool |
ScalarFunction
scalar function
Fields of ScalarFunction
name: String | |
args: Vec<Expr> | |
return_type: DataType |
AggregateFunction
aggregate function
Fields of AggregateFunction
name: String | |
args: Vec<Expr> | |
return_type: DataType |
Methods
impl Expr
[src]
impl Expr
pub fn get_type(&self, schema: &Schema) -> DataType
[src]
pub fn get_type(&self, schema: &Schema) -> DataType
pub 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) -> Expr
pub fn not_eq(&self, other: &Expr) -> Expr
[src]
pub fn not_eq(&self, other: &Expr) -> Expr
pub fn gt(&self, other: &Expr) -> Expr
[src]
pub fn gt(&self, other: &Expr) -> Expr
pub fn gt_eq(&self, other: &Expr) -> Expr
[src]
pub fn gt_eq(&self, other: &Expr) -> Expr
pub fn lt(&self, other: &Expr) -> Expr
[src]
pub fn lt(&self, other: &Expr) -> Expr
pub fn lt_eq(&self, other: &Expr) -> Expr
[src]
pub fn lt_eq(&self, other: &Expr) -> Expr
Trait Implementations
impl Clone for Expr
[src]
impl Clone for Expr
fn clone(&self) -> Expr
[src]
fn clone(&self) -> Expr
Returns 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 Expr
fn eq(&self, other: &Expr) -> bool
[src]
fn eq(&self, other: &Expr) -> bool
This 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) -> bool
This method tests for !=
.
impl Debug for Expr
[src]
impl Debug for Expr