Skip to content

Commit

Permalink
Update the document of function MutableArrayData::extend (#1336)
Browse files Browse the repository at this point in the history
* update document

Signed-off-by: remzi <[email protected]>

* correct the fmt

Signed-off-by: remzi <[email protected]>
  • Loading branch information
HaoYang670 authored Feb 19, 2022
1 parent 193b64c commit 041b77d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions arrow/src/array/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,17 @@ impl<'a> MutableArrayData<'a> {
}
}

/// Extends this [MutableArrayData] with elements from the bounded [ArrayData] at `start`
/// and for a size of `len`.
/// Extends this array with a chunk of its source arrays
///
/// # Arguments
/// * `index` - the index of array that you what to copy values from
/// * `start` - the start index of the chunk (inclusive)
/// * `end` - the end index of the chunk (exclusive)
///
/// # Panic
/// This function panics if the range is out of bounds, i.e. if `start + len >= array.len()`.
/// This function panics if there is an invalid index,
/// i.e. `index` >= the number of source arrays
/// or `end` > the length of the `index`th array
pub fn extend(&mut self, index: usize, start: usize, end: usize) {
let len = end - start;
(self.extend_null_bits[index])(&mut self.data, start, len);
Expand Down

0 comments on commit 041b77d

Please sign in to comment.