Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jeffrey Vo <[email protected]>
  • Loading branch information
alamb and Jefffrey authored Jan 5, 2025
1 parent e8a796a commit 1d48865
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions arrow-buffer/src/buffer/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl Buffer {

/// Returns a new [Buffer] that is a slice of this buffer starting at `offset`.
///
/// This function is `O(1)` and does not copy any data, and allows the
/// This function is `O(1)` and does not copy any data, allowing the
/// same memory region to be shared between buffers.
///
/// # Panics
Expand Down Expand Up @@ -272,7 +272,7 @@ impl Buffer {
/// Returns a new [Buffer] that is a slice of this buffer starting at `offset`,
/// with `length` bytes.
///
/// This function is `O(1)` and does not copy any data and allows the same
/// This function is `O(1)` and does not copy any data, allowing the same
/// memory region to be shared between buffers.
///
/// # Panics
Expand Down Expand Up @@ -454,7 +454,7 @@ impl<T: ArrowNativeType> From<ScalarBuffer<T>> for Buffer {
}
}

/// Convert from internal `Bytes`, not [`bytes::Bytes`] to `Buffer`
/// Convert from internal `Bytes` (not [`bytes::Bytes`]) to `Buffer`
impl From<Bytes> for Buffer {
#[inline]
fn from(bytes: Bytes) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions parquet/src/arrow/array_reader/byte_view_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ impl ByteViewArrayDecoderPlain {
}

pub fn read(&mut self, output: &mut ViewBuffer, len: usize) -> Result<usize> {
// Zero copy convert `bytes::Bytes` into `arrow_buffer:Buffer`
// Zero copy convert `bytes::Bytes` into `arrow_buffer::Buffer`
let buf = arrow_buffer::Buffer::from(self.buf.clone());
let block_id = output.append_block(buf);

Expand Down Expand Up @@ -548,7 +548,7 @@ impl ByteViewArrayDecoderDeltaLength {

let src_lengths = &self.lengths[self.length_offset..self.length_offset + to_read];

// Zero copy convert `bytes::Bytes` into `arrow_buffer:Buffer`
// Zero copy convert `bytes::Bytes` into `arrow_buffer::Buffer`
let bytes = Buffer::from(self.data.clone());
let block_id = output.append_block(bytes);

Expand Down

0 comments on commit 1d48865

Please sign in to comment.