[−][src]Enum arcon::weld::ast::prelude::ExprKind
Expressions in the Weld IR.
This enumeration defines the operators in the Weld IR. Each operator relies on zero or more
sub-expressions, forming an expression tree. We use the term "expression" to refer to a
particular ExprKind
.
Variants
Literal(LiteralKind)
A literal expression.
Weld supports numerical scalar literals (e.g., 1.0 and -5) and ASCII string literals.
Ident(Symbol)
An identifier.
Not(Box<Expr>)
Invert a boolean expression.
Assert(Box<Expr>)
Asserts that the child expression is true. If it isn't, an error is thrown.
Otherwise, this expression always returns true
.
NOTE: Assert currently causes a panic.
Negate(Box<Expr>)
Negates a numerical expression.
Broadcast(Box<Expr>)
Broadcasts a scalar into a vector.
BinOp
Applies a binary operator to the child expressions.
Fields of BinOp
UnaryOp
Applies a unary operator to the child expressions.
Fields of UnaryOp
kind: UnaryOpKind
value: Box<Expr>
Cast
Cast a scalar or SIMD child expression to another type.
Fields of Cast
kind: ScalarKind
child_expr: Box<Expr>
ToVec
Convert a dictionary into a vector of key/value pairs.
Fields of ToVec
MakeStruct
Construct a struct from a list of child expressions.
Fields of MakeStruct
MakeVector
Construct a vector from a list of child expressions.
Fields of MakeVector
Zip
Zip vectors together for iteration.
This operator is only available within a For loop.
Fields of Zip
GetField
Access a struct field at the given index.
Fields of GetField
Length
Get the length of a vector as an i64
.
Fields of Length
Lookup
Lookup a value in a collection.
If data
is a vector, index
must be an i64
specifying the vector index. If data
is a
dictionary, index
is a key. If the key is not present in the dictionary, this expression
raises a KeyNotFoundError
.
Fields of Lookup
OptLookup
A variant of lookup on dictionaries that does not result in an error.
Returns a {bool, V}
, where the bool
indicates whether the value was in the dictionary.
Fields of OptLookup
KeyExists
Check whether a key exists in a dictionary.
Fields of KeyExists
Slice
Slices a vector, creating a view into it.
This does not allocate new data.
Fields of Slice
Sort
Sorts a vector.
The sort operator takes a vector comprised of any non-builder, non-SIMD, or non-dictionary type
and returns a new sorted vector. The sort order is determined by cmpfunc
.
The comparator takes two arguments x
and y
whose type is the vector element type and
returns a positive i32
if x > y
, zero if x == y
, and a negative number of x < y
.
Fields of Sort
Let
Assign a value
to name
, and then evaluate body
.
The environment is updated with name
before body
is run.
Fields of Let
If
Evaluate on_true
or on_false
depending on cond
.
Fields of If
Iterate
Iterate sequentially using an update function.
The initial value has type T
, and the update function has type |T| -> {T, bool}
.
Iteration continues until the update function returns false
.
Fields of Iterate
Select
Select on_true
or on_false
depending on cond
.
Both on_true
and on_false
are evaluated unconditionally.
Fields of Select
Lambda
An expression representing a function.
Fields of Lambda
Apply
Apply a function using a list of parameters.
Fields of Apply
CUDF
A C UDF called by symbol name.
Fields of CUDF
Serialize(Box<Expr>)
Serialize an expression into a vector of bytes.
Deserialize
Deserialize an expression from a vector of bytes.
The expression should be serialized using Serialize
.
Fields of Deserialize
NewBuilder(Option<Box<Expr>>)
Create a new builder.
For
Update a builder in parallel by iterating over data.
Fields of For
Merge
Update a builder value, returning a new builder.
Fields of Merge
Res
Consume a builder and return its result.
Fields of Res
Methods
impl ExprKind
[src]
pub fn name(&self) -> &str
[src]
Return a readable name for the kind.
The name is independent of any subexpressions.
pub fn is_builder_expr(&self) -> bool
[src]
Returns true
if the expression is over builders.
Trait Implementations
impl Eq for ExprKind
[src]
impl PartialEq<ExprKind> for ExprKind
[src]
impl Debug for ExprKind
[src]
impl Clone for ExprKind
[src]
fn clone(&self) -> ExprKind
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for ExprKind
[src]
Auto Trait Implementations
impl !Send for ExprKind
impl Unpin for ExprKind
impl !Sync for ExprKind
impl UnwindSafe for ExprKind
impl !RefUnwindSafe for ExprKind
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Deserialisable<T> for T
[src]
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<K> TrieKey for K where
K: Eq + Hash + ?Sized,
K: Eq + Hash + ?Sized,