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

vortex-data / vortex / 17050663773

18 Aug 2025 07:38PM UTC coverage: 49.695%. First build
17050663773

Pull #4177

github

web-flow
Merge cdc94ae08 into 7eb8ac9fa
Pull Request #4177: feat: ArrayOperations infallible, eager validation + new_unchecked

654 of 1386 new or added lines in 156 files covered. (47.19%)

19893 of 40030 relevant lines covered (49.7%)

229974.76 hits per line

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

0.0
/vortex-array/src/arrays/constant/encode.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
use vortex_error::VortexResult;
5

6
use crate::Canonical;
7
use crate::arrays::{ConstantArray, ConstantEncoding, ConstantVTable};
8
use crate::vtable::EncodeVTable;
9

10
impl EncodeVTable<ConstantVTable> for ConstantVTable {
11
    fn encode(
×
12
        _encoding: &ConstantEncoding,
×
13
        canonical: &Canonical,
×
14
        _like: Option<&ConstantArray>,
×
15
    ) -> VortexResult<Option<ConstantArray>> {
×
16
        let canonical = canonical.as_ref();
×
17
        if canonical.is_constant() {
×
NEW
18
            let scalar = canonical.scalar_at(0);
×
19
            Ok(Some(ConstantArray::new(scalar, canonical.len())))
×
20
        } else {
21
            Ok(None)
×
22
        }
23
    }
×
24
}
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