Skip to content

Commit 86db8cf

Browse files
committed
updated variable names to be more descriptive
1 parent 9527ed0 commit 86db8cf

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

datafusion/core/src/physical_optimizer/coalesce_batches.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ impl CoalesceContext {
6767
/// Creates a new context for a descendent of this context.
6868
/// The descendent will inherit the `has_recursive_ancestor` flag from this context.
6969
fn new_descendent(&self, descendent_plan: Arc<dyn ExecutionPlan>) -> Self {
70+
let ancestor = self;
7071
Self {
71-
has_recursive_ancestor: self.has_recursive_ancestor
72+
has_recursive_ancestor: ancestor.has_recursive_ancestor
7273
|| is_recursive_query(&descendent_plan),
7374
plan: descendent_plan,
7475
}

datafusion/core/src/physical_optimizer/enforce_distribution.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,16 +1467,20 @@ impl DistributionContext {
14671467
/// Creates a new context from a descendent plan.
14681468
/// Importantly, this function propagates the `has_recursive_ancestor` flag.
14691469
fn new_descendent(&self, descendent_plan: Arc<dyn ExecutionPlan>) -> Self {
1470-
let mut ctx = Self::new(descendent_plan);
1471-
ctx.has_recursive_ancestor |= self.has_recursive_ancestor;
1472-
ctx
1470+
let ancestor = self;
1471+
1472+
let mut new_ctx = Self::new(descendent_plan);
1473+
new_ctx.has_recursive_ancestor |= ancestor.has_recursive_ancestor;
1474+
new_ctx
14731475
}
14741476

14751477
/// Creates a new context from a descendent context.
14761478
/// Importantly, this function propagates the `has_recursive_ancestor` flag.
14771479
fn new_descendent_from_ctx(&self, ctx: Self) -> Self {
1480+
let ancestor = self;
1481+
14781482
let mut ctx = ctx;
1479-
ctx.has_recursive_ancestor |= self.has_recursive_ancestor;
1483+
ctx.has_recursive_ancestor |= ancestor.has_recursive_ancestor;
14801484
ctx
14811485
}
14821486

0 commit comments

Comments
 (0)