MCPcopy Create free account
hub / github.com/apache/datafusion / Expr

Enum Expr

datafusion/expr/src/expr.rs:326–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324/// ```
325#[derive(Clone, PartialEq, PartialOrd, Eq, Debug, Hash)]
326pub enum Expr {
327 /// An expression with a specific name.
328 Alias(Alias),
329 /// A named reference to a qualified field in a schema.
330 Column(Column),
331 /// A named reference to a variable in a registry.
332 ScalarVariable(FieldRef, Vec<String>),
333 /// A constant value along with associated [`FieldMetadata`].
334 Literal(ScalarValue, Option<FieldMetadata>),
335 /// A binary expression such as "age > 21"
336 BinaryExpr(BinaryExpr),
337 /// LIKE expression
338 Like(Like),
339 /// LIKE expression that uses regular expressions
340 SimilarTo(Like),
341 /// Negation of an expression. The expression's type must be a boolean to make sense.
342 Not(Box<Expr>),
343 /// True if argument is not NULL, false otherwise. This expression itself is never NULL.
344 IsNotNull(Box<Expr>),
345 /// True if argument is NULL, false otherwise. This expression itself is never NULL.
346 IsNull(Box<Expr>),
347 /// True if argument is true, false otherwise. This expression itself is never NULL.
348 IsTrue(Box<Expr>),
349 /// True if argument is false, false otherwise. This expression itself is never NULL.
350 IsFalse(Box<Expr>),
351 /// True if argument is NULL, false otherwise. This expression itself is never NULL.
352 IsUnknown(Box<Expr>),
353 /// True if argument is FALSE or NULL, false otherwise. This expression itself is never NULL.
354 IsNotTrue(Box<Expr>),
355 /// True if argument is TRUE OR NULL, false otherwise. This expression itself is never NULL.
356 IsNotFalse(Box<Expr>),
357 /// True if argument is TRUE or FALSE, false otherwise. This expression itself is never NULL.
358 IsNotUnknown(Box<Expr>),
359 /// arithmetic negation of an expression, the operand must be of a signed numeric data type
360 Negative(Box<Expr>),
361 /// Whether an expression is between a given range.
362 Between(Between),
363 /// A CASE expression (see docs on [`Case`])
364 Case(Case),
365 /// Casts the expression to a given type and will return a runtime error if the expression cannot be cast.
366 /// This expression is guaranteed to have a fixed type.
367 Cast(Cast),
368 /// Casts the expression to a given type and will return a null value if the expression cannot be cast.
369 /// This expression is guaranteed to have a fixed type.
370 TryCast(TryCast),
371 /// Call a scalar function with a set of arguments.
372 ScalarFunction(ScalarFunction),
373 /// Calls an aggregate function with arguments, and optional
374 /// `ORDER BY`, `FILTER`, `DISTINCT` and `NULL TREATMENT`.
375 ///
376 /// See also [`ExprFunctionExt`] to set these fields.
377 ///
378 /// [`ExprFunctionExt`]: crate::expr_fn::ExprFunctionExt
379 AggregateFunction(AggregateFunction),
380 /// Call a window function with a set of arguments.
381 WindowFunction(Box<WindowFunction>),
382 /// Returns whether the list contains the expr value.
383 InList(InList),

Callers 5

sql_function_to_exprMethod · 0.85
buildMethod · 0.85
function_args_to_sqlMethod · 0.85
try_plan_async_exprsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…