Skip to content

Commit 3cea38b

Browse files
committed
fix rename
1 parent 7cee579 commit 3cea38b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

datafusion/optimizer/src/reorder_join/cost.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use datafusion_common::{Result, plan_err};
1919
use datafusion_expr::{JoinType, LogicalPlan};
2020

21-
use super::query_graph::Edge;
21+
use super::join_graph::Edge;
2222

2323
pub trait JoinCostEstimator: std::fmt::Debug {
2424
fn cardinality(&self, plan: &LogicalPlan) -> Option<f64> {

datafusion/optimizer/src/reorder_join/left_deep_join_plan.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use datafusion_expr::{Expr, Filter, JoinConstraint, LogicalPlan};
2222

2323
use crate::reorder_join::{
2424
cost::JoinCostEstimator,
25-
query_graph::{NodeId, QueryGraph},
25+
join_graph::{JoinGraph, NodeId},
2626
};
2727

2828
/// Generates an optimized left-deep join plan from a logical plan using the Ibaraki-Kameda algorithm.
@@ -76,7 +76,7 @@ pub fn optimal_left_deep_join_plan(
7676
cost_estimator: &dyn JoinCostEstimator,
7777
) -> Result<LogicalPlan> {
7878
// Convert join subtree to query graph
79-
let (query_graph, wrappers) = QueryGraph::try_from_logical_plan(plan)?;
79+
let (query_graph, wrappers) = JoinGraph::try_from_logical_plan(plan)?;
8080

8181
// Optimize the joins
8282
let mut optimized_joins =
@@ -91,7 +91,7 @@ pub fn optimal_left_deep_join_plan(
9191
}
9292

9393
// Reconstruct the full plan with wrappers
94-
crate::reorder_join::query_graph::reconstruct_plan(optimized_joins, wrappers)
94+
crate::reorder_join::join_graph::reconstruct_plan(optimized_joins, wrappers)
9595
}
9696

9797
/// Generates an optimized linear join plan from a query graph using the Ibaraki-Kameda algorithm.
@@ -112,7 +112,7 @@ pub fn optimal_left_deep_join_plan(
112112
/// 3. **Denormalization**: Split merged operations back into individual nodes while maintaining chain structure
113113
/// 4. **Cost Comparison**: Compare the resulting plan's cost against the current best
114114
pub fn query_graph_to_optimal_left_deep_join_plan(
115-
query_graph: &QueryGraph,
115+
query_graph: &JoinGraph,
116116
cost_estimator: &dyn JoinCostEstimator,
117117
) -> Result<LogicalPlan> {
118118
let mut best_graph: Option<PrecedenceTreeNode> = None;
@@ -164,7 +164,7 @@ impl QueryNode {
164164
struct PrecedenceTreeNode<'graph> {
165165
query_nodes: Vec<QueryNode>,
166166
children: Vec<PrecedenceTreeNode<'graph>>,
167-
query_graph: &'graph QueryGraph,
167+
query_graph: &'graph JoinGraph,
168168
}
169169

170170
impl Debug for PrecedenceTreeNode<'_> {
@@ -179,7 +179,7 @@ impl Debug for PrecedenceTreeNode<'_> {
179179
impl<'graph> PrecedenceTreeNode<'graph> {
180180
/// Creates a precedence tree from a query graph.
181181
pub(crate) fn from_query_graph(
182-
graph: &'graph QueryGraph,
182+
graph: &'graph JoinGraph,
183183
root_id: NodeId,
184184
cost_estimator: &dyn JoinCostEstimator,
185185
) -> Result<Self> {
@@ -199,7 +199,7 @@ impl<'graph> PrecedenceTreeNode<'graph> {
199199
fn from_query_node(
200200
node_id: NodeId,
201201
selectivity: f64,
202-
query_graph: &'graph QueryGraph,
202+
query_graph: &'graph JoinGraph,
203203
remaining: &mut HashSet<NodeId>,
204204
cost_estimator: &dyn JoinCostEstimator,
205205
is_root: bool,
@@ -364,7 +364,7 @@ impl<'graph> PrecedenceTreeNode<'graph> {
364364
/// Converts the precedence tree chain into a DataFusion `LogicalPlan`.
365365
pub(crate) fn into_logical_plan(
366366
self,
367-
query_graph: &QueryGraph,
367+
query_graph: &JoinGraph,
368368
) -> Result<LogicalPlan> {
369369
let current_node_id = self.query_nodes[0].node_id;
370370
let mut current_plan = query_graph

0 commit comments

Comments
 (0)