Compute [`get_masked_values`] for a [`GenericByteArray`] Note: this does not check the null mask and will return values contained in null slots
(
array: &'a GenericByteArray<T>,
mask: &BooleanBuffer,
)
| 358 | /// |
| 359 | /// Note: this does not check the null mask and will return values contained in null slots |
| 360 | fn masked_bytes<'a, T: ByteArrayType>( |
| 361 | array: &'a GenericByteArray<T>, |
| 362 | mask: &BooleanBuffer, |
| 363 | ) -> Vec<(usize, Option<&'a [u8]>)> { |
| 364 | let mut out = Vec::with_capacity(mask.count_set_bits()); |
| 365 | for idx in mask.set_indices() { |
| 366 | out.push(( |
| 367 | idx, |
| 368 | array.is_valid(idx).then_some(array.value(idx).as_ref()), |
| 369 | )) |
| 370 | } |
| 371 | out |
| 372 | } |
| 373 | |
| 374 | #[cfg(test)] |
| 375 | mod tests { |
nothing calls this directly
no test coverage detected