• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

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
/encodings/sparse/src/compute/binary_numeric.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use vortex_array::arrays::ConstantArray;
5
use vortex_array::compute::{NumericKernel, NumericKernelAdapter, numeric};
6
use vortex_array::{Array, ArrayRef, IntoArray, register_kernel};
7
use vortex_error::{VortexResult, vortex_err};
8
use vortex_scalar::NumericOperator;
9

10
use crate::{SparseArray, SparseVTable};
11

12
impl NumericKernel for SparseVTable {
UNCOV
13
    fn numeric(
×
UNCOV
14
        &self,
×
UNCOV
15
        array: &SparseArray,
×
UNCOV
16
        rhs: &dyn Array,
×
UNCOV
17
        op: NumericOperator,
×
UNCOV
18
    ) -> VortexResult<Option<ArrayRef>> {
×
UNCOV
19
        let Some(rhs_scalar) = rhs.as_constant() else {
×
20
            return Ok(None);
×
21
        };
22

UNCOV
23
        let new_patches = array.patches().clone().map_values(|values| {
×
UNCOV
24
            let rhs_const_array = ConstantArray::new(rhs_scalar.clone(), values.len()).into_array();
×
25

UNCOV
26
            numeric(&values, &rhs_const_array, op)
×
UNCOV
27
        })?;
×
UNCOV
28
        let new_fill_value = array
×
UNCOV
29
            .fill_scalar()
×
UNCOV
30
            .as_primitive()
×
UNCOV
31
            .checked_binary_numeric(&rhs_scalar.as_primitive(), op)
×
UNCOV
32
            .ok_or_else(|| vortex_err!("numeric overflow"))?
×
UNCOV
33
            .into();
×
34
        Ok(Some(
UNCOV
35
            SparseArray::try_new_from_patches(new_patches, new_fill_value)?.into_array(),
×
36
        ))
UNCOV
37
    }
×
38
}
39

40
register_kernel!(NumericKernelAdapter(SparseVTable).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