We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d0f7f3 commit fe80957Copy full SHA for fe80957
datafusion/physical-plan/src/topk/mod.rs
@@ -352,7 +352,7 @@ impl TopK {
352
return Ok(());
353
};
354
355
- let thresholds: Option<Vec<ScalarValue>>;
+ let mut thresholds: Option<Vec<ScalarValue>> = None;
356
357
// Are the new thresholds more selective than our existing ones?
358
let should_update = {
@@ -366,8 +366,9 @@ impl TopK {
366
if more_selective {
367
current.clear();
368
current.extend_from_slice(max.row());
369
+ thresholds = self.heap.get_threshold_values(&self.expr)?;
370
+ *current_thresholds = thresholds.clone();
371
}
- thresholds = self.heap.get_threshold_values(&self.expr)?;
372
more_selective
373
} else {
374
// No current thresholds, so update with the new ones
0 commit comments