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

[CQF] {a: {$gte: MinKey()}} hits assertion in Cascades

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • QO 2022-08-08

      After https://jira.mongodb.org/browse/SERVER-67782, the server now hits this assertion when attempting to optimize the following query: `{a: {$gte: MinKey()}}` or `{a: {$lte: MaxKey()}}`.

      The assertion maintains the invariant that every PartialSchemaRequirement either has an output binding or is not fully open (constraints the input field in some way). In the aforementioned queries, they have neither: filters have no output binding and the intervals are fully open. This PartialSchemaRequirement is not useful because it is a no-op.

      After a discussion with svilen.mihaylov@mongodb.com, we decided keeping this invariant is useful in order to reduce the Cascades search space. This ticket tracks work to prune fully open PartialSchemaRequirements and avoid creating Sargeable nodes for them.

            Assignee:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: