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

vortex-data / vortex / 17008093231

16 Aug 2025 11:54AM UTC coverage: 87.913% (+0.06%) from 87.855%
17008093231

push

github

web-flow
fix(deps): update slf4j monorepo to v2.0.17 (patch) (#4258)

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [org.slf4j:slf4j-api](http://www.slf4j.org)
([source](https://redirect.github.com/qos-ch/slf4j),
[changelog](https://www.slf4j.org/news.html)) | `2.0.9` -> `2.0.17` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.slf4j:slf4j-api/2.0.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.slf4j:slf4j-api/2.0.9/2.0.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [org.slf4j:slf4j-simple](http://www.slf4j.org)
([source](https://redirect.github.com/qos-ch/slf4j),
[changelog](https://www.slf4j.org/news.html)) | `2.0.9` -> `2.0.17` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.slf4j:slf4j-simple/2.0.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.slf4j:slf4j-simple/2.0.9/2.0.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/vortex-data/vortex).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS43MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNzEuMSIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOlsiY2hvcmUiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

56580 of 64359 relevant lines covered (87.91%)

628739.98 hits per line

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

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

4
use std::any::TypeId;
5
use std::ops::Deref;
6

7
use vortex_array::arrays::StructArray;
8
use vortex_array::{ArrayRef, IntoArray};
9

10
use crate::scope_vars::{ScopeVar, ScopeVars};
11

12
/// Scope define the evaluation context/scope that an expression uses when being evaluated.
13
///
14
/// Other identifier can be bound with variables either before execution or while executing.
15
/// Values can be extracted from the scope by type, see [`ScopeVar`](crate::ScopeVar) for more details.
16
///
17
/// ```code
18
/// <let x = lit(1) in var(Identifier::Identity) + var(x), { Identity -> Primitive[1,2,3]> ->
19
/// <var(Identifier::Identity) + var(x), { Identity -> Primitive[1,2,3], x -> ConstantArray(1)> ->
20
/// <Primitive[1,2,3] + var(x), { Identity -> Primitive[1,2,3], x -> ConstantArray(1)> ->
21
/// <Primitive[1,2,3] + ConstantArray(1), { Identity -> Primitive[1,2,3], x -> ConstantArray(1)> ->
22
/// <Primitive[2,3,4], { Identity -> Primitive[1,2,3], x -> ConstantArray(1)>
23
/// ```
24
///
25
/// Other values can be bound before execution e.g.
26
///  `<var("x") + var("y") + var("z"), x -> ..., y -> ..., z -> ...>`
27
#[derive(Clone)]
28
pub struct Scope {
29
    root: ArrayRef,
30
    /// Variables that can be set on the scope during expression evaluation.
31
    scope_vars: ScopeVars,
32
}
33

34
impl Scope {
35
    /// Create a new scope with the given root array.
36
    pub fn new(root: ArrayRef) -> Self {
15,368✔
37
        Self {
15,368✔
38
            root,
15,368✔
39
            scope_vars: Default::default(),
15,368✔
40
        }
15,368✔
41
    }
15,368✔
42

43
    /// Create a new scope with the root array set an empty struct.
44
    pub fn empty(len: usize) -> Self {
1✔
45
        Self::new(StructArray::new_with_len(len).into_array())
1✔
46
    }
1✔
47

48
    /// Return the root array of the scope.
49
    pub fn root(&self) -> &ArrayRef {
23,967✔
50
        &self.root
23,967✔
51
    }
23,967✔
52

53
    /// Returns a new evaluation scope with the given variable applied.
54
    pub fn with_scope_var<V: ScopeVar>(mut self, var: V) -> Self {
1✔
55
        self.scope_vars.insert(TypeId::of::<V>(), Box::new(var));
1✔
56
        self
1✔
57
    }
1✔
58

59
    /// Returns the scope variable of type `V` if it exists.
60
    pub fn scope_var<V: ScopeVar>(&self) -> Option<&V> {
3✔
61
        self.scope_vars
3✔
62
            .get(&TypeId::of::<V>())
3✔
63
            .and_then(|boxed| (**boxed).as_any().downcast_ref::<V>())
3✔
64
    }
3✔
65

66
    /// Returns the mutable scope variable of type `V` if it exists.
67
    pub fn scope_var_mut<V: ScopeVar>(&mut self) -> Option<&mut V> {
1✔
68
        self.scope_vars
1✔
69
            .get_mut(&TypeId::of::<V>())
1✔
70
            .and_then(|boxed| (**boxed).as_any_mut().downcast_mut::<V>())
1✔
71
    }
1✔
72
}
73

74
impl Deref for Scope {
75
    type Target = ArrayRef;
76

77
    fn deref(&self) -> &Self::Target {
35,594✔
78
        &self.root
35,594✔
79
    }
35,594✔
80
}
81

82
impl From<ArrayRef> for Scope {
83
    fn from(value: ArrayRef) -> Self {
×
84
        Self::new(value)
×
85
    }
×
86
}
87

88
#[cfg(test)]
89
mod test {
90
    #[test]
91
    fn test_scope_var() {
1✔
92
        use super::*;
93

94
        #[derive(Clone, PartialEq, Eq, Debug)]
95
        struct TestVar {
96
            value: i32,
97
        }
98

99
        let scope = Scope::empty(100);
1✔
100
        assert!(scope.scope_var::<TestVar>().is_none());
1✔
101

102
        let var = TestVar { value: 42 };
1✔
103
        let mut scope = scope.with_scope_var(var.clone());
1✔
104
        assert_eq!(scope.scope_var::<TestVar>(), Some(&var));
1✔
105

106
        scope.scope_var_mut::<TestVar>().unwrap().value = 43;
1✔
107
        assert_eq!(scope.scope_var::<TestVar>(), Some(&TestVar { value: 43 }));
1✔
108
    }
1✔
109
}
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