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

vortex-data / vortex / 16176491672

09 Jul 2025 05:48PM UTC coverage: 78.1% (+0.01%) from 78.09%
16176491672

push

github

web-flow
ci: update target dir for coverage runs (#3805)

The `-C instrument-coverage` flag doesn't play well with ASAN, because
both instruments require hooking into shutdown so one ends up overriding
the other.

Signed-off-by: Andrew Duffy <andrew@a10y.dev>

44146 of 56525 relevant lines covered (78.1%)

53416.23 hits per line

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

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

4
use vortex_dtype::{FieldName, StructFields};
5
use vortex_error::VortexExpect;
6
use vortex_utils::aliases::hash_set::HashSet;
7

8
use crate::transform::annotations::{AnnotationFn, Annotations, descendent_annotations};
9
use crate::{ExprRef, GetItemVTable, SelectVTable, is_root};
10

11
pub type FieldAccesses<'a> = Annotations<'a, FieldName>;
12

13
/// An [`AnnotationFn`] for annotating scope accesses.
14
pub fn annotate_scope_access(scope: &StructFields) -> impl AnnotationFn<Annotation = FieldName> {
2,168✔
15
    move |expr: &ExprRef| {
5,731✔
16
        assert!(
5,731✔
17
            !expr.is::<SelectVTable>(),
5,731✔
18
            "cannot analyse select, simplify the expression"
×
19
        );
20

21
        if let Some(get_item) = expr.as_opt::<GetItemVTable>() {
5,731✔
22
            if is_root(get_item.child()) {
2,301✔
23
                return vec![get_item.field().clone()];
2,295✔
24
            }
6✔
25
        } else if is_root(expr) {
3,430✔
26
            return scope.names().iter().cloned().collect();
361✔
27
        }
3,069✔
28

29
        vec![]
3,075✔
30
    }
5,731✔
31
}
2,168✔
32

33
/// For all subexpressions in an expression, find the fields that are accessed directly from the
34
/// scope, but not any fields in those fields
35
/// e.g. scope = {a: {b: .., c: ..}, d: ..}, expr = ident().a.b + ident().d accesses {a,d} (not b).
36
///
37
/// Note: This is a very naive, but simple analysis to find the fields that are accessed directly on an
38
/// identity node. This is combined to provide an over-approximation of the fields that are accessed
39
/// by an expression.
40
pub fn immediate_scope_accesses<'a>(
1,120✔
41
    expr: &'a ExprRef,
1,120✔
42
    scope: &'a StructFields,
1,120✔
43
) -> FieldAccesses<'a> {
1,120✔
44
    descendent_annotations(expr, annotate_scope_access(scope))
1,120✔
45
}
1,120✔
46

47
/// This returns the immediate scope_access (as explained `immediate_scope_accesses`) for `expr`.
48
pub fn immediate_scope_access<'a>(
1,120✔
49
    expr: &'a ExprRef,
1,120✔
50
    scope: &'a StructFields,
1,120✔
51
) -> HashSet<FieldName> {
1,120✔
52
    immediate_scope_accesses(expr, scope)
1,120✔
53
        .get(expr)
1,120✔
54
        .vortex_expect("Expression missing from scope accesses, this is a internal bug")
1,120✔
55
        .clone()
1,120✔
56
}
1,120✔
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