Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: coldWater <[email protected]>
  • Loading branch information
forsaken628 committed Oct 10, 2024
1 parent 1efe3f7 commit 52a6386
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/common/base/src/base/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ impl Write for DmaWriteBuf {
while !buf.is_empty() {
let (dst, remain) = match self.data.last_mut() {
Some(dst) if dst.len() < dst.capacity() => {
let remian = dst.capacity() - dst.len();
(dst, remian)
let remain = dst.capacity() - dst.len();
(dst, remain)
}
_ => {
self.data
Expand Down
13 changes: 6 additions & 7 deletions src/query/service/src/spillers/spiller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,18 +433,17 @@ impl BlocksEncoder {
}

fn add_block(&mut self, block: DataBlock) {
let start = self.size();
let columns_layout = block
.columns()
.iter()
.map(|entry| {
let columns_layout = std::iter::once(self.size())
.chain(block.columns().iter().map(|entry| {
let column = entry
.value
.convert_to_full_column(&entry.data_type, block.num_rows());
serialize_column_in(&column, &mut self.buf).unwrap();
self.size() - start
})
self.size()
}))
.map_windows(|x: &[_; 2]| x[1] - x[0])
.collect();

self.columns_layout.push(columns_layout);
self.offsets.push(self.size())
}
Expand Down

0 comments on commit 52a6386

Please sign in to comment.