mqy commented on a change in pull request #9193:
URL: https://github.com/apache/arrow/pull/9193#discussion_r558804008
##########
File path: rust/arrow/src/array/data.rs
##########
@@ -219,17 +219,17 @@ impl ArrayData {
///
/// Panics if `offset + length > self.len()`.
pub fn slice(&self, offset: usize, length: usize) -> ArrayData {
- assert!((offset + length) <= self.len());
-
- let mut new_data = self.clone();
-
- new_data.len = length;
- new_data.offset = offset + self.offset;
+ self.copy_range(offset, length)
Review comment:
This is the attempt to implement slice with MutableArrayData, but
triggers ARROW-11263
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]