Expand description
BooleanArray — the bit-packed Bool column.
Unlike every other fixed-width type, Bool stores one bit per value, so
its values buffer is a Bitmap rather than a crate::ScalarBuffer.
Both buffers — values and validity — use the same LSB-first numbering, and
both slice by bit offset, so slicing a boolean column stays free.
use astrs_data::array::{Array, BooleanArray};
let flags = BooleanArray::from_opt_iter([Some(true), None, Some(false)]);
assert_eq!(flags.len(), 3);
assert_eq!(flags.null_count(), 1);
assert_eq!(flags.get(0), Some(true));
assert_eq!(flags.get(1), None);
assert_eq!(flags.true_count(), 1);Structs§
- Boolean
Array - A bit-packed column of booleans with an optional validity bitmap.