Skip to content

Commit 041b77d

Browse files
authored
Update the document of function MutableArrayData::extend (#1336)
* update document Signed-off-by: remzi <13716567376yh@gmail.com> * correct the fmt Signed-off-by: remzi <13716567376yh@gmail.com>
1 parent 193b64c commit 041b77d

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

  • arrow/src/array/transform

arrow/src/array/transform/mod.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,17 @@ impl<'a> MutableArrayData<'a> {
614614
}
615615
}
616616

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

0 commit comments

Comments
 (0)