Expand description
DataFusion is an extensible query execution framework that uses Apache Arrow as its in-memory format.
This crate is a submodule of DataFusion that provides types representing logical query plans (LogicalPlan) and logical expressions (Expr) as well as utilities for working with these types.
The expr_fn module contains functions for creating expressions.
Re-exports§
pub use expr::Between;
pub use expr::BinaryExpr;
pub use expr::Case;
pub use expr::Cast;
pub use expr::Expr;
pub use expr::GetFieldAccess;
pub use expr::GroupingSet;
pub use expr::Like;
pub use expr::Sort as SortExpr;
pub use expr::TryCast;
pub use expr::WindowFunctionDefinition;
pub use expr_schema::ExprSchemable;
pub use function::PartitionEvaluatorFactory;
pub use function::ReturnTypeFunction;
pub use function::ScalarFunctionImplementation;
pub use function::StateTypeFunction;
pub use window_frame::WindowFrame;
pub use window_frame::WindowFrameBound;
pub use window_frame::WindowFrameUnits;
pub use sqlparser;
pub use expr_fn::*;
pub use logical_plan::*;
Modules§
- Coercion rules for matching argument types for binary operators
- Conditional expressions
- Logical Expressions:
Expr
- Functions for creating logical expressions
- Expression rewriter
- Function module contains typing and signature for built-in and user defined functions.
ContextProvider
andExprPlanner
APIs to customize SQL query planning- FunctionRegistry trait
- Structs and traits to provide the information needed for expression simplification.
- Tree node implementation for Logical Expressions
- Type coercion rules for DataFusion
- Expression utilities
- Variable provider
- Window frame module
- Structures used to hold window function state (for implementing WindowUDFs)
Macros§
Structs§
- Logical representation of a user-defined aggregate function (UDAF).
- Documentation for use by
ScalarUDFImpl
,AggregateUDFImpl
andWindowUDFImpl
functions that will be used to generate public documentation. - A builder to be used for building
Documentation
’s. - Logical representation of a Scalar User Defined Function.
- Defines the supported argument types (
TypeSignature
) andVolatility
for a function. - Arguments passed to
AggregateUDFImpl::value_from_stats
- Logical representation of a user-defined window function (UDWF) A UDWF is different from a UDF in that it is stateful across batches.
Enums§
- A window function built in to DataFusion
- The result of evaluating an expression.
- Describes how many rows should be emitted during grouping.
- Operators applied to expressions
- Indicates how a filter expression is handled by
TableProvider::scan
. - Indicates the type of this table for metadata/catalog purposes.
- A function’s type signature defines the types of arguments the function supports.
- A function’s volatility, which defines the functions eligibility for certain optimizations
Constants§
- Constant that is used as a placeholder for any valid timezone. This is used where a function can accept a timestamp type with any valid timezone, it exists to avoid the need to enumerate all possible timezones. See
TypeSignature
for more details.
Traits§
- Tracks an aggregate function’s state.
- Trait for implementing
AggregateUDF
. GroupsAccumulator
implements a single aggregate (e.g. AVG) and stores the state for all groups internally.- Trait for converting a type to a
Literal
literal expression. - Partition evaluator for Window Functions
- Trait for implementing
ScalarUDF
. - Access schema information and filter push-down capabilities.
- Trait for converting a type to a literal timestamp
- Trait for implementing
WindowUDF
.
Functions§
- Create a literal expression
- Create a literal timestamp expression
Type Aliases§
- Factory that returns an accumulator for the given aggregate function.