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

vortex-data / vortex / 16835424474

08 Aug 2025 04:27PM UTC coverage: 84.938% (+0.003%) from 84.935%
16835424474

Pull #4174

github

web-flow
Merge 28736a3aa into a16b0e365
Pull Request #4174: fix[scan]: don't convert filter to `cnf` just extract `and` list

19 of 20 new or added lines in 3 files covered. (95.0%)

3 existing lines in 3 files now uncovered.

50674 of 59660 relevant lines covered (84.94%)

567699.25 hits per line

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

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

4
use crate::{BinaryVTable, ExprRef};
5

6
/// Converting an expression to a conjunctive normal form can lead to a large number of expression
7
/// nodes.
8
/// For now, we will just extract the conjuncts from the expression, and return a vector of conjuncts.
9
/// We could look at try cnf with a size cap and otherwise return the original conjuncts.
10
pub fn conjuncts(expr: &ExprRef) -> Vec<ExprRef> {
40,806✔
11
    let mut conjuncts = vec![];
40,806✔
12
    conjuncts_impl(expr, &mut conjuncts);
40,806✔
13
    if conjuncts.is_empty() {
40,806✔
NEW
14
        conjuncts.push(expr.clone());
×
15
    }
40,806✔
16
    conjuncts
40,806✔
17
}
40,806✔
18

19
fn conjuncts_impl(expr: &ExprRef, conjuncts: &mut Vec<ExprRef>) {
43,092✔
20
    if let Some(expr) = expr.as_opt::<BinaryVTable>() {
43,092✔
21
        if expr.op() == crate::Operator::And {
5,277✔
22
            conjuncts_impl(expr.lhs(), conjuncts);
1,143✔
23
            conjuncts_impl(expr.rhs(), conjuncts);
1,143✔
24
            return;
1,143✔
25
        }
4,134✔
26
    }
37,815✔
27
    conjuncts.push(expr.clone());
41,949✔
28
}
43,092✔
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