Module expressions

Source
Expand description

Defines physical expressions that can evaluated at runtime during query execution

Structs§

BinaryExpr
Binary expression
CaseExpr
The CASE expression is similar to a series of nested if/else and there are two forms that can be used. The first form consists of a series of boolean “when” expressions with corresponding “then” expressions, and an optional “else” expression.
CastExpr
CAST expression casts an expression to a specific data type and returns a runtime error on invalid cast
Column
Represents the column at a given index in a RecordBatch
InListExpr
InList
IsNotNullExpr
IS NOT NULL expression
IsNullExpr
IS NULL expression
LikeExpr
Literal
Represents a literal value
NegativeExpr
Negative expression
NoOp
A place holder expression, can not be evaluated.
NotExpr
Not expression
PhysicalSortExpr
Represents Sort operation for a column in a RecordBatch
TryCastExpr
TRY_CAST expression casts an expression to a specific data type and returns NULL on invalid cast
UnKnownColumn

Enums§

StatsType
TODO: Move this to functions-aggregate module Enum used for differentiating population and sample for statistical functions

Functions§

binary
Create a binary expression whose arguments are correctly coerced. This function errors if it is not possible to coerce the arguments to computational types supported by the operator.
case
Create a CASE expression
cast
Return a PhysicalExpression representing expr casted to cast_type, if any casting is needed.
col
Create a column expression
format_state_name
Build state name. State is the intermediate state of the aggregate function.
in_list
Creates a unary expression InList
is_not_null
Create an IS NOT NULL expression
is_null
Create an IS NULL expression
like
Create a like expression, erroring if the argument types are not compatible.
lit
Create a literal expression
negative
Creates a unary expression NEGATIVE
not
Creates a unary expression NOT
similar_to
Create a similar to expression
try_cast
Return a PhysicalExpression representing expr casted to cast_type, if any casting is needed.
with_new_schema
Rewrites an expression according to new schema; i.e. changes the columns it refers to with the column at corresponding index in the new schema. Returns an error if the given schema has fewer columns than the original schema. Note that the resulting expression may not be valid if data types in the new schema is incompatible with expression nodes.