Crate datafusion_physical_plan
source ·Expand description
Traits for physical query plan, supporting parallel execution for partitioned relations.
Entrypoint of this crate is trait ExecutionPlan.
Re-exports§
pub use crate::display::DefaultDisplay;pub use crate::display::DisplayAs;pub use crate::display::DisplayFormatType;pub use crate::display::VerboseDisplay;pub use crate::execution_plan::collect;pub use crate::execution_plan::collect_partitioned;pub use crate::execution_plan::displayable;pub use crate::execution_plan::execute_input_stream;pub use crate::execution_plan::execute_stream;pub use crate::execution_plan::execute_stream_partitioned;pub use crate::execution_plan::get_plan_string;pub use crate::execution_plan::with_new_children_if_necessary;pub use crate::execution_plan::ExecutionMode;pub use crate::execution_plan::ExecutionPlan;pub use crate::execution_plan::ExecutionPlanProperties;pub use crate::execution_plan::PlanProperties;pub use crate::metrics::Metric;pub use crate::stream::EmptyRecordBatchStream;
Modules§
- Aggregates functionalities
- Defines the ANALYZE operator
CoalesceBatchesExeccombines small batches into larger batches.- Defines the merge plan for executing partitions in parallel and then merging the results into a single partition
- Defines common code used in execution plans
- Implementation of physical plan display. See
crate::displayablefor examples of how to format - EmptyRelation with produce_one_row=false execution plan
- Defines the EXPLAIN operator
- Defines physical expressions that can evaluated at runtime during query execution
- Deprecated module. Add new feature in scalar_function.rs
- Functionality used both on logical and physical plans
- Execution plan for writing data to
DataSinks - DataFusion Join implementations
- Defines the LIMIT plan
- Execution plan for reading in-memory batches of data
- Metrics for recording information about execution
- EmptyRelation produce_one_row=true execution plan
- 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. - Defines the recursive query plan
- 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. - Sort functionalities
- Defines the spilling functions
- Stream wrappers for physical operators
- Generic plans for deferred execution:
StreamingTableExecandPartitionStream - This module provides common traits for visiting or rewriting tree nodes easily.
- The Union operator combines multiple inputs with the same schema
- Define a plan for unnesting values in columns that contain a list type.
- Values execution plan
- Physical expressions for window functions
- Defines the work table query plan
Macros§
- 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. - Macro wraps Err(
$ERR) to add backtrace feature
Structs§
- Statistics for a column within a relation
- 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.
- Global TopK
Enums§
- The result of evaluating an expression.
- How data is distributed amongst partitions. See
Partitioningfor more details. - Specifies how the input to an aggregation or window operator is ordered relative to their
GROUP BYorPARTITION BYexpressions. - Output partitioning supported by
ExecutionPlans.
Traits§
- Tracks an aggregate function’s state.
- 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. - Trait for types that stream arrow::record_batch::RecordBatch
- Common trait for window function implementations
Functions§
- Visit all children of this plan, according to the order defined on
ExecutionPlanVisitor. - Applies an optional projection to a
SchemaRef, returning the projected schema - Recursively calls
pre_visitandpost_visitfor this node and all of its children, as described onExecutionPlanVisitor
Type Aliases§
- Trait for a
StreamofRecordBatches