Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81317

Rewrite conjunction $expr expressions for time-series matches on the timeField

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration

      We currently do not create a wholeBucketFilter for conjunction match predicates like this for time-series:

      {$expr: {$and: [ {$gt: ['$time', <start time>]}, {$lt: ['$time', <end time>]}]}}

      We don't do this because for $expr predicates we call createPredicate and not createPredicatesOnBucketLevelField here. However, we can call createPredicatesOnBucketLevelField to recur down the match expression. However, we need to confirm that the predicate is just on the timeField. If createPredicatesOnBucketLevelField is called on this predicate:

      {$expr: {$or: [ {$gt: ['$time', <start time>]}, {$eq: ['$meta', 3]}]}} 

      a document with the metaField [\{b: 2}, \{b:3}] was returned, which is incorrect.

       

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: