• 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/builders/null.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use std::any::Any;
5

6
use vortex_dtype::DType;
7
use vortex_error::VortexResult;
8
use vortex_mask::Mask;
9

10
use crate::arrays::NullArray;
11
use crate::builders::ArrayBuilder;
12
use crate::{Array, ArrayRef, IntoArray};
13

14
pub struct NullBuilder {
15
    length: usize,
16
}
17

18
impl Default for NullBuilder {
19
    fn default() -> Self {
×
20
        Self::new()
×
21
    }
×
22
}
23

24
impl NullBuilder {
UNCOV
25
    pub fn new() -> Self {
×
UNCOV
26
        Self { length: 0 }
×
UNCOV
27
    }
×
28
}
29

30
impl ArrayBuilder for NullBuilder {
31
    fn as_any(&self) -> &dyn Any {
×
32
        self
×
33
    }
×
34

35
    fn as_any_mut(&mut self) -> &mut dyn Any {
×
36
        self
×
37
    }
×
38

39
    fn dtype(&self) -> &DType {
×
40
        &DType::Null
×
41
    }
×
42

43
    fn len(&self) -> usize {
×
44
        self.length
×
45
    }
×
46

47
    fn append_zeros(&mut self, n: usize) {
×
48
        self.length += n;
×
49
    }
×
50

51
    fn append_nulls(&mut self, n: usize) {
×
52
        self.length += n;
×
53
    }
×
54

55
    fn extend_from_array(&mut self, array: &dyn Array) -> VortexResult<()> {
×
56
        assert_eq!(array.dtype(), &DType::Null);
×
57
        self.append_nulls(array.len());
×
58
        Ok(())
×
59
    }
×
60

61
    fn ensure_capacity(&mut self, _capacity: usize) {}
×
62

63
    fn set_validity(&mut self, validity: Mask) {
×
64
        self.length = validity.len();
×
65
    }
×
66

UNCOV
67
    fn finish(&mut self) -> ArrayRef {
×
UNCOV
68
        NullArray::new(self.length).into_array()
×
UNCOV
69
    }
×
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc