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

vortex-data / vortex / 17045413678

18 Aug 2025 03:43PM UTC coverage: 86.065% (-1.8%) from 87.913%
17045413678

Pull #4215

github

web-flow
Merge 2657b4c8e into cb2220961
Pull Request #4215: Ji/vectors

136 of 1803 new or added lines in 42 files covered. (7.54%)

127 existing lines in 26 files now uncovered.

56918 of 66134 relevant lines covered (86.06%)

612050.14 hits per line

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

0.0
/vortex-expr/src/operator/mod.rs
1
// SPDX-License-Identifier: Apache-2.0
2
// SPDX-FileCopyrightText: Copyright the Vortex contributors
3

4
mod reduce;
5

6
use std::rc::Rc;
7

8
pub use reduce::*;
9
use vortex_array::Array;
10
use vortex_error::{VortexResult, vortex_err};
11
use vortex_vector::operators::Operator;
12

13
use crate::traversal::{FoldUp, NodeFolder};
14
use crate::{ExprRef, RootVTable};
15

16
pub struct ExprOperatorConverter<'a> {
17
    root: &'a dyn Array,
18
}
19

20
impl<'a> ExprOperatorConverter<'a> {
NEW
21
    pub fn new(root: &'a dyn Array) -> Self {
×
NEW
22
        Self { root }
×
NEW
23
    }
×
24
}
25

26
// Needs a mapping from Root array to encoding -> Operator
27

28
impl<'a> NodeFolder for ExprOperatorConverter<'a> {
29
    type NodeTy = ExprRef;
30
    type Result = Option<Rc<dyn Operator>>;
31

NEW
32
    fn visit_up(
×
NEW
33
        &mut self,
×
NEW
34
        node: ExprRef,
×
NEW
35
        children: Vec<Option<Rc<dyn Operator>>>,
×
NEW
36
    ) -> VortexResult<FoldUp<Option<Rc<dyn Operator>>>> {
×
NEW
37
        let Some(children) = children.into_iter().collect::<Option<Vec<_>>>() else {
×
NEW
38
            return Ok(FoldUp::Stop(None));
×
39
        };
NEW
40
        if node.as_opt::<RootVTable>().is_some() {
×
NEW
41
            let Some(operator) = self.root.to_operator()? else {
×
NEW
42
                return Ok(FoldUp::Stop(None));
×
43
            };
NEW
44
            return Ok(FoldUp::Continue(Some(operator)));
×
NEW
45
        }
×
NEW
46
        node.operator(children)
×
NEW
47
            .ok_or_else(|| vortex_err!("Failed to convert operator: {:?}", node))
×
NEW
48
            .map(Some)
×
NEW
49
            .map(FoldUp::Continue)
×
NEW
50
    }
×
51
}
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