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

Handle empty window in SBE window with first/last removable accumulators set to Constant Expression

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: 7.1.1
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v7.1
    • QE 2023-10-16, QE 2023-10-30
    • 147

      In SBE Window stage we track the first/last documents in a window in dedicated slots. We use these slots to compute the first/last accumulators. We use these slots to decide if the window is empty and what the result should be. When the expression assigned to first/last accumulator in the query is a constant we do not associate it with a slot. Thus, we do not have a way to say if the window is empty. In this case we return the constant expression even when the window is empty. This is not expected. The results when the window is empty should be null.

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: