Skip to main content

Module expr

Module expr 

Source
Expand description

Expressions in RisingWave.

All expressions are implemented under the SyncExpression or AsyncExpression trait.

ยงConstruction

Expressions can be constructed by build_func() function, which returns a BoxedExpression.

They can also be transformed from the prost ExprNode using the build_from_prost() function.

ยงEvaluation

Expressions can be evaluated using the eval function.

Re-exportsยง

pub use super::ExprError;
pub use super::Result;

Modulesยง

and_or ๐Ÿ”’
For expression that only accept two nullable arguments as input.
build ๐Ÿ”’
expr_input_ref ๐Ÿ”’
expr_literal ๐Ÿ”’
expr_some_all ๐Ÿ”’
expr_udf ๐Ÿ”’
test_utils
Helper functions to construct prost ExprNode for test.
value ๐Ÿ”’
wrapper ๐Ÿ”’

Structsยง

Context
An optional context that can be used in a function.
InputRefExpression
A reference to a column in input relation.
LiteralExpression
A literal expression.
LogReport
Log the error to report an error during evaluation.

Enumsยง

BoxedExpression
An owned dynamically typed expression.
NonStrictExpression
An type-safe wrapper that indicates the inner expression can be evaluated in a non-strict manner, i.e., developers can directly call eval_infallible and eval_row_infallible without checking the result.
ValueImpl
The type-erased return value of an expression.
ValueRef
The generic reference type of ValueImpl. Used as the arguments of expressions.

Traitsยง

AsyncDynExpression
Object-safe adapter for asynchronous expressions.
AsyncExpression
Interface of an asynchronous expression.
AsyncExpressionBoxExt
Extension trait for boxing async expressions.
EvalErrorReport
Report an error during evaluation.
ExpressionInfo
Common metadata of an expression.
SyncExpression
Interface of a synchronous expression.
SyncExpressionBoxExt
Extension trait for boxing expressions.

Functionsยง

build_batch_expr_from_prost
Build a strict or non-strict expression according to expr context.
build_from_pretty
Build an expression from a string.
build_from_prost
Build an expression from protobuf.
build_func
Build an expression in FuncCall variant.
build_func_non_strict
Build an expression in FuncCall variant in non-strict mode.
build_non_strict_from_prost
Build an expression from protobuf in non-strict mode.
try_convert_all
Try to convert all items in a vector, or return the original vector if any conversion fails.
try_into_sync_exprs
Try to unwrap boxed expressions into sync expressions.