Skip to content

Commit

Permalink
Fix LogicalPlan::transform_..._with_subqueries methods
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-toth committed Nov 27, 2024
1 parent acc2c7d commit 94c66a0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions datafusion/expr/src/logical_plan/tree_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,10 @@ fn rewrite_extension_inputs<F: FnMut(LogicalPlan) -> Result<Transformed<LogicalP
macro_rules! handle_transform_recursion {
($F_DOWN:expr, $F_CHILD:expr, $F_UP:expr) => {{
$F_DOWN?
.transform_children(|n| n.map_subqueries($F_CHILD))?
.transform_sibling(|n| n.map_children($F_CHILD))?
.transform_children(|n| {
n.map_subqueries($F_CHILD)?
.transform_sibling(|n| n.map_children($F_CHILD))
})?
.transform_parent($F_UP)
}};
}
Expand Down Expand Up @@ -746,13 +748,12 @@ impl LogicalPlan {
node: LogicalPlan,
f: &mut F,
) -> Result<Transformed<LogicalPlan>> {
f(node)?
.transform_children(|n| {
n.map_subqueries(|c| transform_down_with_subqueries_impl(c, f))
})?
.transform_sibling(|n| {
n.map_children(|c| transform_down_with_subqueries_impl(c, f))
})
f(node)?.transform_children(|n| {
n.map_subqueries(|c| transform_down_with_subqueries_impl(c, f))?
.transform_sibling(|n| {
n.map_children(|c| transform_down_with_subqueries_impl(c, f))
})
})
}

transform_down_with_subqueries_impl(self, &mut f)
Expand Down

0 comments on commit 94c66a0

Please sign in to comment.