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 Nov 13, 2024
1 parent fd35133 commit b0ba9d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/base/src/base/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ mod tests {

#[test]
fn test_dma_buffer_to_bytes() {
let want = (0..10_u8).into_iter().collect::<Vec<_>>();
let want = (0..10_u8).collect::<Vec<_>>();
let alloc = DmaAllocator::new(Alignment::new(4096).unwrap());
let mut buf = DmaBuffer::with_capacity_in(3000, alloc);
buf.extend_from_slice(&want);
Expand Down
3 changes: 1 addition & 2 deletions src/query/service/src/spillers/spiller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use std::ops::Range;
use std::sync::Arc;
use std::time::Instant;

use bytes::Bytes;
use databend_common_base::base::dma_buffer_to_bytes;
use databend_common_base::base::dma_read_file_range;
use databend_common_base::base::Alignment;
Expand Down Expand Up @@ -410,7 +409,7 @@ impl Spiller {
let buf = buf
.into_data()
.into_iter()
.map(|x| Bytes::from(dma_buffer_to_bytes(x)))
.map(dma_buffer_to_bytes)
.collect::<Buffer>();
let written = buf.len();
writer.write(buf).await?;
Expand Down

0 comments on commit b0ba9d9

Please sign in to comment.