Commits

Chao Sun authored fbcaf9f920e
ARROW-4853: [Rust] Array slice doesn't work on ListArray and StructArray This fixes a few issues related to Array offset and slicing: 1. The invariant check in ListArray::from() is no longer valid for the case of offset. This removes the check. 2. Both `Array::is_valid` and `Array::is_null` should take into account of offset. 3. `StructArray::len()` should return `data.len()` instead of the length of the first child array. In the case of slicing, we'll not modify child array data so the previous approach will return wrong result. Author: Chao Sun <sunchao@apache.org> Closes #3972 from sunchao/ARROW-4853 and squashes the following commits: 299d6a43 <Chao Sun> Fix StructBuilder reuse c8633467 <Chao Sun> Improve unit tests 78e8e880 <Chao Sun> Fix format e0fed916 <Chao Sun> Fix StructArray::column 8278c786 <Chao Sun> Fix StructArray::From<Vec<(Field, ArrayRef)>> c7814331 <Chao Sun> Fix StructBuilder length & unit tests 99af8d50 <Chao Sun> ARROW-4853: Array slice doesn't work on ListArray and StructArray