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

SBE stage builder should handle the case of $top/$bottom output field being constant

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • QE 2023-06-12
    • 155

      Currently SBE stage builder assumes the argument to $top/$bottom must be an intermediate object expression. This is not always true, because after optimization, the object expression (ExpressionObject) might turn into a constant (ExpressionConstant).

      https://github.com/mongodb/mongo/blob/0ef2c68f58ea20c2dde99e5ce3ea10b79e18453d/src/mongo/db/query/sbe_stage_builder.cpp#L2466-L2470

            Assignee:
            rui.liu@mongodb.com Rui Liu
            Reporter:
            rui.liu@mongodb.com Rui Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: