From 041b77d24359cc539c4eacaee652d7e9da5d9b97 Mon Sep 17 00:00:00 2001 From: Remzi Yang <59198230+HaoYang670@users.noreply.github.com> Date: Sun, 20 Feb 2022 00:05:11 +0800 Subject: [PATCH] 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> --- arrow/src/array/transform/mod.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arrow/src/array/transform/mod.rs b/arrow/src/array/transform/mod.rs index 71af9e1b7c22..b1df6823ef63 100644 --- a/arrow/src/array/transform/mod.rs +++ b/arrow/src/array/transform/mod.rs @@ -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);