Skip to content

Commit 357c352

Browse files
committed
noclone
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent ea25a77 commit 357c352

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

vortex-array/src/executor.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ impl ArrayRef {
108108
pub fn execute_until<M: Matcher>(self, ctx: &mut ExecutionCtx) -> VortexResult<ArrayRef> {
109109
// Clone the session up-front so each `optimize_ctx` call below borrows from this owned
110110
// value rather than re-borrowing through `&mut ctx`.
111-
let session = ctx.session().clone();
112111
let mut current = self;
113112
let mut stack: Vec<StackFrame> = Vec::new();
114113

@@ -124,7 +123,7 @@ impl ArrayRef {
124123
return Ok(current);
125124
}
126125
Some(frame) => {
127-
current = frame.put_back(current)?.optimize_ctx(&session)?;
126+
current = frame.put_back(current)?.optimize_ctx(ctx.session())?;
128127
continue;
129128
}
130129
}
@@ -140,9 +139,9 @@ impl ArrayRef {
140139
"execute_parent rewrote {} -> {}",
141140
current, rewritten
142141
));
143-
current = rewritten.optimize_ctx(&session)?;
142+
current = rewritten.optimize_ctx(ctx.session())?;
144143
if let Some(frame) = stack.pop() {
145-
current = frame.put_back(current)?.optimize_ctx(&session)?;
144+
current = frame.put_back(current)?.optimize_ctx(ctx.session())?;
146145
}
147146
continue;
148147
}
@@ -161,7 +160,7 @@ impl ArrayRef {
161160
));
162161
let frame = StackFrame::new(parent, i, done, &child);
163162
stack.push(frame);
164-
current = child.optimize_ctx(&session)?;
163+
current = child.optimize_ctx(ctx.session())?;
165164
}
166165
ExecutionStep::Done => {
167166
ctx.log(format_args!("Done: {}", array));

0 commit comments

Comments
 (0)