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

$alwaysFalse not pushed down in time series unpack bucket

    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      `$alwaysFalse` does not get pushed down in time series unpack bucket resulting in `COLLSCAN` instead of `EOF` for queries that simplify to `$alwaysFalse`. For example, for `db.coll.find(color:var(--ds-text, #172b4d)}$expr: {$and: [{$lt: ["$_id", 5]}, false, true])`, the explain output shows:

               {
                   "$_internalUnpackBucket" : {
                       "exclude" : [ ],
                       "timeField" : "overrideTimeFieldName",
                       "metaField" : "metaFieldName",
                       "bucketMaxSpanSeconds" : 3600,
                      "assumeNoMixedSchemaData" : true,
                       "eventFilter" : {
                           "$alwaysFalse" : 1
                       },
                       "sbeCompatible" : false
                   }
               }

      with the `winningPlan`:

                          "winningPlan" : {
                               "isCached" : false,
                               "stage" : "COLLSCAN",
                               "direction" : "forward"
                           } 

            Assignee:
            Unassigned Unassigned
            Reporter:
            sopho.kevlishvili@mongodb.com Sopho Kevlishvili
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None