Skip to main content

datafusion_physical_plan/
lib.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18#![doc(
19    html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
20    html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
21)]
22#![cfg_attr(docsrs, feature(doc_cfg))]
23// Make sure fast / cheap clones on Arc are explicit:
24// https://github.com/apache/datafusion/issues/11143
25#![deny(clippy::clone_on_ref_ptr)]
26#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
27
28//! Traits for physical query plan, supporting parallel execution for partitioned relations.
29//!
30//! Entrypoint of this crate is trait [ExecutionPlan].
31
32pub use datafusion_common::hash_utils;
33pub use datafusion_common::utils::project_schema;
34pub use datafusion_common::{ColumnStatistics, Statistics, internal_err};
35pub use datafusion_execution::{RecordBatchStream, SendableRecordBatchStream};
36pub use datafusion_expr::{Accumulator, ColumnarValue};
37use datafusion_physical_expr::PhysicalSortExpr;
38pub use datafusion_physical_expr::window::WindowExpr;
39pub use datafusion_physical_expr::{
40    Distribution, Partitioning, PhysicalExpr, expressions,
41};
42
43pub use crate::display::{DefaultDisplay, DisplayAs, DisplayFormatType, VerboseDisplay};
44pub use crate::execution_plan::{
45    ExecutionPlan, ExecutionPlanProperties, PlanProperties, collect, collect_partitioned,
46    displayable, execute_input_stream, execute_stream, execute_stream_partitioned,
47    get_plan_string, with_new_children_if_necessary,
48};
49pub use crate::metrics::Metric;
50pub use crate::ordering::InputOrderMode;
51pub use crate::sort_pushdown::SortOrderPushdownResult;
52pub use crate::stream::EmptyRecordBatchStream;
53pub use crate::topk::TopK;
54pub use crate::visitor::{ExecutionPlanVisitor, accept, visit_execution_plan};
55pub use crate::work_table::WorkTable;
56pub use spill::spill_manager::SpillManager;
57
58mod ordering;
59mod render_tree;
60mod topk;
61mod visitor;
62
63pub mod aggregates;
64pub mod analyze;
65pub mod async_func;
66pub mod buffer;
67pub mod coalesce;
68pub mod coalesce_batches;
69pub mod coalesce_partitions;
70pub mod column_rewriter;
71pub mod common;
72pub mod coop;
73pub mod display;
74pub mod empty;
75pub mod execution_plan;
76pub mod explain;
77pub mod filter;
78pub mod filter_pushdown;
79pub mod joins;
80pub mod limit;
81pub mod memory;
82pub mod metrics;
83pub mod placeholder_row;
84pub mod projection;
85pub mod recursive_query;
86pub mod repartition;
87pub mod sort_pushdown;
88pub mod sorts;
89pub mod spill;
90pub mod stream;
91pub mod streaming;
92pub mod tree_node;
93pub mod union;
94pub mod unnest;
95pub mod windows;
96pub mod work_table;
97pub mod udaf {
98    pub use datafusion_expr::StatisticsArgs;
99    pub use datafusion_physical_expr::aggregate::AggregateFunctionExpr;
100}
101
102pub mod test;