Expand description
re-export of datafusion_physical_plan crate
Modules§
- aggregates
- Aggregates functionalities
- analyze
- Defines the ANALYZE operator
- async_
func - coalesce
- coalesce_
batches CoalesceBatchesExeccombines small batches into larger batches.- coalesce_
partitions - Defines the merge plan for executing partitions in parallel and then merging the results into a single partition
- common
- Defines common code used in execution plans
- coop
- Utilities for improved cooperative scheduling.
- display
- Implementation of physical plan display. See
crate::displayablefor examples of how to format - empty
- EmptyRelation with produce_one_row=false execution plan
- execution_
plan - explain
- Defines the EXPLAIN operator
- filter
- filter_
pushdown - Filter Pushdown Optimization Process
- joins
- DataFusion Join implementations
- limit
- Defines the LIMIT plan
- memory
- Execution plan for reading in-memory batches of data
- metrics
- Metrics for recording information about execution
- placeholder_
row - EmptyRelation produce_one_row=true execution plan
- projection
- Defines the projection execution plan. A projection determines which columns or expressions
are returned from a query. The SQL statement
SELECT a, b, a+b FROM t1is an example of a projection on tablet1where the expressionsa,b, anda+bare the projection expressions.SELECTwithoutFROMwill only evaluate expressions. - recursive_
query - Defines the recursive query plan
- repartition
- This file implements the
RepartitionExecoperator, which maps N input partitions to M output partitions based on a partitioning scheme, optionally maintaining the order of the input rows in the output. - sorts
- Sort functionalities
- spill
- Defines the spilling functions
- stream
- Stream wrappers for physical operators
- streaming
- Generic plans for deferred execution:
StreamingTableExecandPartitionStream - test
- Utilities for testing datafusion-physical-plan
- tree_
node - This module provides common traits for visiting or rewriting tree nodes easily.
- udaf
- union
- The Union operator combines multiple inputs with the same schema
- unnest
- Define a plan for unnesting values in columns that contain a list type.
- windows
- Physical expressions for window functions
- work_
table - Defines the work table query plan
Macros§
- handle_
state - The
handle_statemacro is designed to process the result of a state-changing operation. It operates on aStatefulStreamResultby matching its variants and executing corresponding actions. This macro is used to streamline code that deals with state transitions, reducing boilerplate and improving readability. - internal_
err - Macro wraps Err(
$ERR) to add backtrace feature
Structs§
- Column
Statistics - Statistics for a column within a relation
- Default
Display - A new type wrapper to display
TimplementingDisplayAsusing theDefaultmode - Empty
Record Batch Stream EmptyRecordBatchStreamcan be used to create aRecordBatchStreamthat will produce no results- Metric
- Something that tracks a value of interest (metric) of a DataFusion
ExecutionPlanexecution. - Plan
Properties - Stores certain, often expensive to compute, plan properties used in query optimization.
- Spill
Manager - The
SpillManageris responsible for the following tasks: - Statistics
- Statistics for a relation Fields are optional and can be inexact because the sources sometimes provide approximate estimates for performance reasons and the transformations output are not always predictable.
- TopK
- Global TopK
- Verbose
Display - A new type wrapper to display
TimplementingDisplayAsusing theVerbosemode - Work
Table - The name is from PostgreSQL’s terminology. See https://wiki.postgresql.org/wiki/CTEReadme#How_Recursion_Works This table serves as a mirror or buffer between each iteration of a recursive query.
Enums§
- Columnar
Value - The result of evaluating an expression.
- Display
Format Type - Options for controlling how each
ExecutionPlanshould format itself - Distribution
- How data is distributed amongst partitions. See
Partitioningfor more details. - Input
Order Mode - Specifies how the input to an aggregation or window operator is ordered
relative to their
GROUP BYorPARTITION BYexpressions. - Partitioning
- Output partitioning supported by
ExecutionPlans.
Traits§
- Accumulator
- Tracks an aggregate function’s state.
- Display
As - Trait for types which could have additional details when formatted in
Verbosemode - Execution
Plan - Represent nodes in the DataFusion Physical Plan.
- Execution
Plan Properties - Extension trait provides an easy API to fetch various properties of
ExecutionPlanobjects based onExecutionPlan::properties. - Execution
Plan Visitor - Trait that implements the Visitor
pattern for a
depth first walk of
ExecutionPlannodes.pre_visitis called before any children are visited, and thenpost_visitis called after all children have been visited. - Physical
Expr PhysicalExprs represent expressions such asA + 1orCAST(c1 AS int).- Record
Batch Stream - Trait for types that stream RecordBatch
- Window
Expr - Common trait for window function implementations
Functions§
- accept
- Visit all children of this plan, according to the order defined on
ExecutionPlanVisitor. - collect
- Execute the ExecutionPlan and collect the results in memory
- collect_
partitioned - Execute the ExecutionPlan and collect the results in memory
- displayable
- Return a
DisplayableExecutionPlanwrapper around anExecutionPlanwhich can be displayed in various easier to understand ways. - execute_
input_ stream - Executes an input stream and ensures that the resulting stream adheres to
the
not nullconstraints specified in thesink_schema. - execute_
stream - Execute the ExecutionPlan and return a single stream of
RecordBatches. - execute_
stream_ partitioned - Execute the ExecutionPlan and return a vec with one stream per output partition
- get_
plan_ string - Utility function yielding a string representation of the given
ExecutionPlan. - project_
schema - Applies an optional projection to a
SchemaRef, returning the projected schema - visit_
execution_ plan - Recursively calls
pre_visitandpost_visitfor this node and all of its children, as described onExecutionPlanVisitor - with_
new_ children_ if_ necessary - Returns a copy of this plan if we change any child according to the pointer comparison.
The size of
childrenmust be equal to the size ofExecutionPlan::children().
Type Aliases§
- Sendable
Record Batch Stream - Trait for a [
Stream] ofRecordBatches that can be passed between threads