Module datafusion::logical_plan [−][src]
Expand description
This module provides a logical query plan enum that can describe queries. Logical query plans can be created from a SQL statement or built programmatically via the Table API.
Logical query plans can then be optimized and executed directly, or translated into physical query plans and executed.
Modules
Window frame
Structs
A named reference to a qualified field in a schema.
DFField wraps an Arrow field and adds an optional qualifier
DFSchema wraps an Arrow schema and adds relation names
Builder for logical plans
Enums
Expr
is a central struct of DataFusion’s query API, and
represent logical expressions such as A + 1
, or CAST(c1 AS int)
.
Join constraint
Join type
A LogicalPlan represents the different types of relational operators (such as Projection, Filter, etc) and can be created by the SQL query planner and the DataFrame API.
Operators applied to expressions
Logical partitioning schemes supported by the repartition operator.
Represents which type of plan, when storing multiple for use in EXPLAIN plans
Controls how the visitor recursion should proceed.
Controls how the ExprRewriter recursion should proceed.
Constants
Default table name for unnamed table
Traits
Trait for potentially recursively rewriting an Expr
expression
tree. When passed to Expr::rewrite
, ExpressionVisitor::mutate
is
invoked recursively on all nodes of an expression tree. See the
comments on Expr::rewrite
for details on its use
Encode the traversal of an expression tree. When passed to
Expr::accept
, ExpressionVisitor::visit
is invoked
recursively on all nodes of an expression tree. See the comments
on Expr::accept
for details on its use
A registry knows how to build logical expressions out of user-defined function’ names
Trait that implements the Visitor
pattern for a
depth first walk of LogicalPlan
nodes. pre_visit
is called
before any children are visited, and then post_visit
is called
after all children have been visited.
To use, define a struct that implements this trait and then invoke
LogicalPlan::accept
.
Convenience trait to convert Schema like things to DFSchema and DFSchemaRef with fewer keystrokes
This defines the interface for LogicalPlan
nodes that can be
used to extend DataFusion with custom relational operators.
Functions
this scalar function is not documented yet
this scalar function is not documented yet
return a new expression with a logical AND
Returns the approximate number of distinct input values. This function provides an approximation of count(DISTINCT x). Zero is returned if all input values are null. This function should produce a standard error of 0.81%, which is the standard deviation of the (approximately normal) error distribution over all possible sets. It does not guarantee an upper bound on the error for any specific input set.
returns an array of fixed size with each argument on it.
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Create an expression to represent the avg() aggregate function
return a new expression l
this scalar function is not documented yet
this scalar function is not documented yet
Creates a schema for a join operation. The fields from the left side are first
Create a CASE WHEN statement with literal WHEN expressions for comparison to the base expression.
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Create a column expression based on a qualified or unqualified column name
Convert an expression into Column expression if it’s already provided as input plan.
Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical AND. Returns None if the filters array is empty.
Concatenates the text representations of all the arguments. NULL arguments are ignored.
Concatenates all but the first argument, with separators. The first argument is used as the separator string, and should not be NULL. Other NULL arguments are ignored.
this scalar function is not documented yet
Create an expression to represent the count() aggregate function
Create an expression to represent the count(distinct) aggregate function
Creates a new UDAF with a specific signature, state type and return type.
The signature and state type must match the Accumulator's implementation
.
Creates a new UDF with a specific signature and specific return type.
This is a helper function to create a new UDF.
The function create_udf
returns a subset of all possible ScalarFunction
:
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Print the schema in a compact representation to buf
this scalar function is not documented yet
Create field meta-data from an expression, for use in a result set schema
this scalar function is not documented yet
Create an in_list expression
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Create a literal expression
Create a literal timestamp expression
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Create an expression to represent the max() aggregate function
this scalar function is not documented yet
Create an expression to represent the min() aggregate function
Recursively call Column::normalize
on all Column expressions
in the expr
expression tree.
Recursively normalize all Column expressions in a list of expression trees
this scalar function is not documented yet
this scalar function is not documented yet
return a new expression with a logical OR
Returns a random value in the range 0.0 <= x < 1.0
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Recursively replace all Column expressions in a given expression tree with Column expressions provided by the hash map argument.
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Create an expression to represent the sum() aggregate function
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
this scalar function is not documented yet
Union two logical plans with an optional alias.
Recursively ‘unnormalize’ (remove all qualifiers) from an expression tree.
Recursively un-normalize all Column expressions in a list of expression trees
this scalar function is not documented yet
Create a CASE WHEN statement with boolean WHEN expressions and no base expression.
Type Definitions
A reference-counted reference to a DFSchema
.