Skip to content

Commit b652e7c

Browse files
authored
compute: Reduce memory usage in TopK (#38240)
Nothing major
1 parent 4831d20 commit b652e7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compute/src/render/top_k.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ where
722722
// We decode the datums once, into a common buffer for efficiency.
723723
// Each row should contain `arity` columns; we should check that.
724724
let temp_storage = mz_repr::RowArena::new();
725-
let mut buffer = datum_vec.borrow();
725+
let mut buffer = Vec::with_capacity(arity * source.len());
726726
for (index, (datums, _)) in source.iter().enumerate() {
727727
datums.extend_datums(&temp_storage, &mut buffer, None);
728728
assert_eq!(buffer.len(), arity * (index + 1));

0 commit comments

Comments
 (0)