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

vortex-data / vortex / 16728097825

04 Aug 2025 04:00PM UTC coverage: 48.355% (-35.1%) from 83.429%
16728097825

Pull #4108

github

web-flow
Merge 1b2d27fd8 into 649ba9576
Pull Request #4108: perf[vortex-array]: use all_valid instead of `invalid_count() == 0`

1 of 1 new or added line in 1 file covered. (100.0%)

11596 existing lines in 378 files now uncovered.

18635 of 38538 relevant lines covered (48.35%)

151786.4 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 {
UNCOV
15
    fn sum(&self, array: &BoolArray) -> VortexResult<Scalar> {
×
UNCOV
16
        let true_count: Option<u64> = match array.validity_mask()?.boolean_buffer() {
×
17
            AllOr::All => {
18
                // All-valid
UNCOV
19
                Some(array.boolean_buffer().count_set_bits() as u64)
×
20
            }
21
            AllOr::None => {
22
                // All-invalid
23
                unreachable!("All-invalid boolean array should have been handled by entry-point")
×
24
            }
25
            AllOr::Some(validity_mask) => Some(
×
26
                array
×
27
                    .boolean_buffer()
×
28
                    .bitand(validity_mask)
×
29
                    .count_set_bits() as u64,
×
30
            ),
×
31
        };
UNCOV
32
        Ok(Scalar::from(true_count))
×
UNCOV
33
    }
×
34
}
35

36
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