pub enum Expression {
Show 36 variants
Identifier(Identifier),
QualifiedIdentifier(QualifiedIdentifier),
IntegerLiteral(IntegerLiteral),
FloatLiteral(FloatLiteral),
StringLiteral(StringLiteral),
BooleanLiteral(BooleanLiteral),
NullLiteral(NullLiteral),
IntervalLiteral(IntervalLiteral),
BoundValue(Box<Value>),
Parameter(Parameter),
Prefix(PrefixExpression),
Infix(InfixExpression),
List(Box<ListExpression>),
Distinct(DistinctExpression),
Exists(ExistsExpression),
AllAny(AllAnyExpression),
In(InExpression),
InHashSet(InHashSetExpression),
Between(BetweenExpression),
Like(LikeExpression),
ScalarSubquery(ScalarSubquery),
ExpressionList(Box<ExpressionList>),
Case(Box<CaseExpression>),
Cast(CastExpression),
FunctionCall(Box<FunctionCall>),
Aliased(AliasedExpression),
Window(Box<WindowExpression>),
TableSource(Box<SimpleTableSource>),
JoinSource(Box<JoinTableSource>),
SubquerySource(Box<SubqueryTableSource>),
ValuesSource(Box<ValuesTableSource>),
CteReference(Box<CteReference>),
FunctionTableSource(Box<FunctionTableSource>),
Star(StarExpression),
QualifiedStar(QualifiedStarExpression),
Default(DefaultExpression),
}Expand description
Expression enum representing all expression types
Variants§
Identifier(Identifier)
Identifier (column name, table name)
QualifiedIdentifier(QualifiedIdentifier)
Qualified identifier (table.column)
IntegerLiteral(IntegerLiteral)
Integer literal
FloatLiteral(FloatLiteral)
Float literal
StringLiteral(StringLiteral)
String literal
BooleanLiteral(BooleanLiteral)
Boolean literal (TRUE/FALSE)
NullLiteral(NullLiteral)
NULL literal
IntervalLiteral(IntervalLiteral)
INTERVAL literal
BoundValue(Box<Value>)
Executor-bound typed value. Never produced by the SQL parser; this preserves exact subquery/runtime identity during internal rewriting.
Parameter(Parameter)
Parameter ($1, ?)
Prefix(PrefixExpression)
Prefix expression (-x, NOT x)
Infix(InfixExpression)
Infix expression (a + b, a = b)
List(Box<ListExpression>)
List of expressions (for IN clause) - Boxed to reduce enum size
Distinct(DistinctExpression)
DISTINCT expression
Exists(ExistsExpression)
EXISTS subquery
AllAny(AllAnyExpression)
ALL/ANY/SOME subquery comparison (e.g., x > ALL (SELECT …))
In(InExpression)
IN expression
InHashSet(InHashSetExpression)
Pre-computed IN expression with HashSet (for semi-join optimization) Uses Arc for cheap cloning in parallel execution
Between(BetweenExpression)
BETWEEN expression
Like(LikeExpression)
LIKE expression (with optional ESCAPE clause)
ScalarSubquery(ScalarSubquery)
Scalar subquery
ExpressionList(Box<ExpressionList>)
Expression list (for IN values) - Boxed to reduce enum size
Case(Box<CaseExpression>)
CASE expression - Boxed to reduce enum size
Cast(CastExpression)
CAST expression
FunctionCall(Box<FunctionCall>)
Function call - Boxed to reduce enum size (has 2 Vecs)
Aliased(AliasedExpression)
Aliased expression (expr AS alias)
Window(Box<WindowExpression>)
Window expression - Boxed to reduce enum size (has 2 Vecs)
TableSource(Box<SimpleTableSource>)
Simple table source - Boxed to reduce enum size
JoinSource(Box<JoinTableSource>)
Join table source
SubquerySource(Box<SubqueryTableSource>)
Subquery table source - Boxed to reduce enum size (216 bytes unboxed)
ValuesSource(Box<ValuesTableSource>)
VALUES table source - Boxed to reduce enum size (256 bytes unboxed)
CteReference(Box<CteReference>)
CTE reference - Boxed to reduce enum size (336 bytes unboxed)
FunctionTableSource(Box<FunctionTableSource>)
Function table source (table-valued function in FROM clause) - Boxed to reduce enum size
Star(StarExpression)
Star (*) for SELECT *
QualifiedStar(QualifiedStarExpression)
Qualified star (table.) for SELECT table.
Default(DefaultExpression)
DEFAULT keyword (for INSERT VALUES)
Implementations§
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more