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_auto_cfg))]
23// Make cheap clones clear: https://github.com/apache/datafusion/issues/11143
24#![deny(clippy::clone_on_ref_ptr)]
25
26//! Traits for physical query plan, supporting parallel execution for partitioned relations.
27//!
28//! Entrypoint of this crate is trait [ExecutionPlan].
29
30pub use datafusion_common::hash_utils;
31pub use datafusion_common::utils::project_schema;
32pub use datafusion_common::{internal_err, ColumnStatistics, Statistics};
33pub use datafusion_execution::{RecordBatchStream, SendableRecordBatchStream};
34pub use datafusion_expr::{Accumulator, ColumnarValue};
35pub use datafusion_physical_expr::window::WindowExpr;
36use datafusion_physical_expr::PhysicalSortExpr;
37pub use datafusion_physical_expr::{
38    expressions, udf, Distribution, Partitioning, PhysicalExpr,
39};
40
41pub use crate::display::{DefaultDisplay, DisplayAs, DisplayFormatType, VerboseDisplay};
42pub use crate::execution_plan::{
43    collect, collect_partitioned, displayable, execute_input_stream, execute_stream,
44    execute_stream_partitioned, get_plan_string, with_new_children_if_necessary,
45    ExecutionPlan, ExecutionPlanProperties, PlanProperties,
46};
47pub use crate::metrics::Metric;
48pub use crate::ordering::InputOrderMode;
49pub use crate::stream::EmptyRecordBatchStream;
50pub use crate::topk::TopK;
51pub use crate::visitor::{accept, visit_execution_plan, ExecutionPlanVisitor};
52
53mod ordering;
54mod topk;
55mod visitor;
56
57pub mod aggregates;
58pub mod analyze;
59pub mod coalesce_batches;
60pub mod coalesce_partitions;
61pub mod common;
62pub mod display;
63pub mod empty;
64pub mod execution_plan;
65pub mod explain;
66pub mod filter;
67pub mod insert;
68pub mod joins;
69pub mod limit;
70pub mod memory;
71pub mod metrics;
72pub mod placeholder_row;
73pub mod projection;
74pub mod recursive_query;
75pub mod repartition;
76pub mod sorts;
77pub mod spill;
78pub mod stream;
79pub mod streaming;
80pub mod tree_node;
81pub mod union;
82pub mod unnest;
83pub mod values;
84pub mod windows;
85pub mod work_table;
86pub mod udaf {
87    pub use datafusion_expr::StatisticsArgs;
88    pub use datafusion_physical_expr::aggregate::AggregateFunctionExpr;
89}
90
91pub mod coalesce;
92#[cfg(test)]
93pub mod test;