• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vortex-data / vortex / 17032541022

18 Aug 2025 06:10AM UTC coverage: 87.911%. First build
17032541022

Pull #2456

github

web-flow
Merge 87ea4e137 into d578fe02e
Pull Request #2456: feat: basic BoolBuffer / BoolBufferMut

1281 of 1435 new or added lines in 114 files covered. (89.27%)

57302 of 65182 relevant lines covered (87.91%)

655044.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
/vortex-array/src/arrays/bool/compute/sum.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use std::ops::BitAnd;
5

6
use vortex_error::VortexResult;
7
use vortex_mask::AllOr;
8
use vortex_scalar::Scalar;
9

10
use crate::arrays::{BoolArray, BoolVTable};
11
use crate::compute::{SumKernel, SumKernelAdapter};
12
use crate::register_kernel;
13

14
impl SumKernel for BoolVTable {
15
    fn sum(&self, array: &BoolArray) -> VortexResult<Scalar> {
19,575✔
16
        let true_count: Option<u64> = match array.validity_mask()?.bit_buffer() {
19,575✔
17
            AllOr::All => {
18
                // All-valid
19
                Some(array.bit_buffer().true_count() as u64)
19,575✔
20
            }
21
            AllOr::None => {
22
                // All-invalid
23
                unreachable!("All-invalid boolean array should have been handled by entry-point")
×
24
            }
NEW
25
            AllOr::Some(validity_mask) => {
×
NEW
26
                Some(array.bit_buffer().bitand(validity_mask).true_count() as u64)
×
27
            }
28
        };
29
        Ok(Scalar::from(true_count))
19,575✔
30
    }
19,575✔
31
}
32

33
register_kernel!(SumKernelAdapter(BoolVTable).lift());
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc