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

vortex-data / vortex / 17073077835

19 Aug 2025 02:40PM UTC coverage: 24.083%. First build
17073077835

Pull #4177

github

web-flow
Merge b42e5758f into 431a8f2b5
Pull Request #4177: feat: ArrayOperations infallible, eager validation + new_unchecked

197 of 1455 new or added lines in 154 files covered. (13.54%)

8646 of 35901 relevant lines covered (24.08%)

142.28 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