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

getdozer / dozer / 6015776084

29 Aug 2023 06:23PM UTC coverage: 75.53% (-0.8%) from 76.332%
6015776084

push

github

web-flow
Bump clap from 4.3.11 to 4.4.1 (#1941)

Bumps [clap](https://github.com/clap-rs/clap) from 4.3.11 to 4.4.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.11...v4.4.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

49075 of 64974 relevant lines covered (75.53%)

65362.51 hits per line

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

57.81
/dozer-sql/src/pipeline/selection/factory.rs
1
use std::collections::HashMap;
2

3
use crate::pipeline::errors::PipelineError;
4
use crate::pipeline::expression::builder::ExpressionBuilder;
5
use dozer_core::processor_record::ProcessorRecordStore;
6
use dozer_core::{
7
    node::{OutputPortDef, OutputPortType, PortHandle, Processor, ProcessorFactory},
8
    DEFAULT_PORT_HANDLE,
9
};
10
use dozer_types::{errors::internal::BoxedError, types::Schema};
11
use sqlparser::ast::Expr as SqlExpr;
12

13
use super::processor::SelectionProcessor;
14

15
#[derive(Debug)]
×
16
pub struct SelectionProcessorFactory {
×
17
    statement: SqlExpr,
18
    id: String,
19
}
20

21
impl SelectionProcessorFactory {
22
    /// Creates a new [`SelectionProcessorFactory`].
23
    pub fn new(id: String, statement: SqlExpr) -> Self {
177✔
24
        Self { statement, id }
177✔
25
    }
177✔
26
}
×
27

×
28
impl ProcessorFactory for SelectionProcessorFactory {
×
29
    fn id(&self) -> String {
×
30
        self.id.clone()
×
31
    }
×
32
    fn type_name(&self) -> String {
×
33
        "Selection".to_string()
×
34
    }
×
35
    fn get_input_ports(&self) -> Vec<PortHandle> {
704✔
36
        vec![DEFAULT_PORT_HANDLE]
704✔
37
    }
704✔
38

×
39
    fn get_output_ports(&self) -> Vec<OutputPortDef> {
528✔
40
        vec![OutputPortDef::new(
528✔
41
            DEFAULT_PORT_HANDLE,
528✔
42
            OutputPortType::Stateless,
528✔
43
        )]
528✔
44
    }
528✔
45

×
46
    fn get_output_schema(
176✔
47
        &self,
176✔
48
        _output_port: &PortHandle,
176✔
49
        input_schemas: &HashMap<PortHandle, Schema>,
176✔
50
    ) -> Result<Schema, BoxedError> {
176✔
51
        let schema = input_schemas
176✔
52
            .get(&DEFAULT_PORT_HANDLE)
176✔
53
            .ok_or(PipelineError::InvalidPortHandle(DEFAULT_PORT_HANDLE))?;
176✔
54
        Ok(schema.clone())
176✔
55
    }
176✔
56

×
57
    fn build(
176✔
58
        &self,
176✔
59
        input_schemas: HashMap<PortHandle, Schema>,
176✔
60
        _output_schemas: HashMap<PortHandle, Schema>,
176✔
61
        _record_store: &ProcessorRecordStore,
176✔
62
    ) -> Result<Box<dyn Processor>, BoxedError> {
176✔
63
        let schema = input_schemas
176✔
64
            .get(&DEFAULT_PORT_HANDLE)
176✔
65
            .ok_or(PipelineError::InvalidPortHandle(DEFAULT_PORT_HANDLE))?;
176✔
66

×
67
        match ExpressionBuilder::new(schema.fields.len()).build(false, &self.statement, schema) {
176✔
68
            Ok(expression) => Ok(Box::new(SelectionProcessor::new(
176✔
69
                schema.clone(),
176✔
70
                expression,
176✔
71
            ))),
176✔
72
            Err(e) => Err(e.into()),
×
73
        }
×
74
    }
176✔
75
}
×
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