arrow2 0.18.0

Unofficial implementation of Apache Arrow spec in safe Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use arrow2::array::growable::{Growable, GrowableBoolean};
use arrow2::array::BooleanArray;

#[test]
fn test_bool() {
    let array = BooleanArray::from(vec![Some(false), Some(true), None, Some(false)]);

    let mut a = GrowableBoolean::new(vec![&array], false, 0);

    a.extend(0, 1, 2);
    assert_eq!(a.len(), 2);

    let result: BooleanArray = a.into();

    let expected = BooleanArray::from(vec![Some(true), None]);
    assert_eq!(result, expected);
}