Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
datafusion::logical_plan - Rust
[go: Go Back, main page]

Module datafusion::logical_plan[][src]

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.

Structs

DFField

DFField wraps an Arrow field and adds an optional qualifier

DFSchema

DFSchema wraps an Arrow schema and adds relation names

LogicalPlanBuilder

Builder for logical plans

StringifiedPlan

Represents some sort of execution plan, in String form

Enums

Expr

Expr is a central struct of DataFusion’s query API, and represent logical expressions such as A + 1, or CAST(c1 AS int).

JoinType

Join type

LogicalPlan

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.

Operator

Operators applied to expressions

Partitioning

Logical partitioning schemes supported by the repartition operator.

PlanType

Represents which type of plan

Recursion

Controls how the visitor recursion should proceed.

Traits

ExprRewriter

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

ExpressionVisitor

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

FunctionRegistry

A registry knows how to build logical expressions out of user-defined function’ names

Literal

Trait for converting a type to a Literal literal expression.

PlanVisitor

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”.

ToDFSchema

Convenience trait to convert Schema like things to DFSchema and DFSchemaRef with fewer keystrokes

UserDefinedLogicalNode

This defines the interface for LogicalPlan nodes that can be used to extend DataFusion with custom relational operators.

Functions

abs
acos
and

return a new expression with a logical AND

array

returns an array of fixed size with each argument on it.

ascii
asin
atan
avg

Create an expression to represent the avg() aggregate function

binary_expr

return a new expression l r

bit_length
btrim
case

Create a CASE WHEN statement with literal WHEN expressions for comparison to the base expression.

ceil
character_length
chr
col

Create a column expression based on a column name

combine_filters

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.

concat
concat_ws
cos
count

Create an expression to represent the count() aggregate function

count_distinct

Create an expression to represent the count(distinct) aggregate function

create_udaf

Creates a new UDAF with a specific signature, state type and return type. The signature and state type must match the Acumulator's implementation.

create_udf

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:

display_schema

Print the schema in a compact representation to buf

exp
exprlist_to_fields

Create field meta-data from an expression, for use in a result set schema

floor
in_list

Create an in_list expression

initcap
left
length
lit

Create a literal expression

ln
log2
log10
lower
lpad
ltrim
max

Create an expression to represent the max() aggregate function

md5
min

Create an expression to represent the min() aggregate function

octet_length
or

return a new expression with a logical OR

regexp_match
regexp_replace
repeat
replace
reverse
right
round
rpad
rtrim
sha224
sha256
sha384
sha512
signum
sin
split_part
sqrt
starts_with
strpos
substr
sum

Create an expression to represent the sum() aggregate function

tan
to_hex
translate
trim
trunc
upper
when

Create a CASE WHEN statement with boolean WHEN expressions and no base expression.

Type Definitions

DFSchemaRef

A reference-counted reference to a DFSchema.