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

geo-engine / geoengine / 18909350612

29 Oct 2025 01:22PM UTC coverage: 88.317%. First build
18909350612

Pull #1084

github

web-flow
Merge e370339cd into 85068105d
Pull Request #1084: feat: Add time_query() and TimeDescriptor

2409 of 2689 new or added lines in 73 files covered. (89.59%)

115141 of 130373 relevant lines covered (88.32%)

225651.18 hits per line

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

0.0
/operators/src/processing/map_query.rs
1
use crate::engine::{QueryContext, VectorQueryProcessor, VectorResultDescriptor};
2
use crate::util::Result;
3
use async_trait::async_trait;
4

5
use futures::stream::BoxStream;
6
use geoengine_datatypes::primitives::VectorQueryRectangle;
7

8
/// This `QueryProcessor` allows to rewrite a query. It does not change the data. Results of the children are forwarded.
9
pub(crate) struct MapQueryProcessor<S, Q> {
10
    source: S,
11
    query_fn: Q,
12
}
13

14
impl<S, Q> MapQueryProcessor<S, Q> {
NEW
15
    pub fn new(source: S, query_fn: Q) -> Self {
×
NEW
16
        Self { source, query_fn }
×
17
    }
×
18
}
19

20
#[async_trait]
21
impl<S, Q> VectorQueryProcessor for MapQueryProcessor<S, Q>
22
where
23
    S: VectorQueryProcessor,
24
    Q: Fn(VectorQueryRectangle) -> Result<Option<VectorQueryRectangle>> + Sync + Send,
25
    S::VectorType: Send,
26
{
27
    type VectorType = S::VectorType;
28
    async fn vector_query<'a>(
29
        &'a self,
30
        query: VectorQueryRectangle,
31
        ctx: &'a dyn QueryContext,
32
    ) -> Result<BoxStream<'a, Result<Self::VectorType>>> {
×
33
        let rewritten_query = (self.query_fn)(query)?;
×
34
        if let Some(rewritten_query) = rewritten_query {
×
35
            self.source.vector_query(rewritten_query, ctx).await
×
36
        } else {
37
            tracing::debug!("Query was rewritten to empty query. Returning empty stream.");
×
38
            Ok(Box::pin(futures::stream::empty())) // TODO: should be empty collection?
×
39
        }
40
    }
×
41

42
    fn vector_result_descriptor(&self) -> &VectorResultDescriptor {
×
43
        self.source.vector_result_descriptor()
×
44
    }
×
45
}
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