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

vortex-data / vortex / 16992684502

15 Aug 2025 02:56PM UTC coverage: 87.875% (+0.2%) from 87.72%
16992684502

Pull #2456

github

web-flow
Merge 2d540e578 into 4a23f65b3
Pull Request #2456: feat: basic BoolBuffer / BoolBufferMut

1275 of 1428 new or added lines in 110 files covered. (89.29%)

334 existing lines in 31 files now uncovered.

57169 of 65057 relevant lines covered (87.88%)

658056.52 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,731✔
16
        let true_count: Option<u64> = match array.validity_mask()?.bit_buffer() {
19,731✔
17
            AllOr::All => {
18
                // All-valid
19
                Some(array.bit_buffer().true_count() as u64)
19,731✔
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,731✔
30
    }
19,731✔
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