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

vortex-data / vortex / 16979224669

14 Aug 2025 11:42PM UTC coverage: 23.728%. First build
16979224669

Pull #2456

github

web-flow
Merge 30049dfa7 into aaf3e36ad
Pull Request #2456: feat: basic BoolBuffer / BoolBufferMut

68 of 1065 new or added lines in 82 files covered. (6.38%)

8616 of 36312 relevant lines covered (23.73%)

146.37 hits per line

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

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