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

XMLWordPrintableJSON

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

      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
            Reporter:
            Foteini Alvanaki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: