[SBE] Add support for the COUNT_SCAN stage to the SBE stage builders

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • QE 2023-05-15, QE 2023-05-29, QE 2023-06-12
    • 1
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When I tried to run the "bestbuy_agg_query_comparison.js" benchmark (fromĀ https://github.com/10gen/workloads) with useAgg=true and with SBE mode enabled, the benchmark failed with an error message saying "Can't build exec tree for node: COUNT".

      I've created a simple example that reproduces the failure:

      > db.adminCommand({setParameter:1, internalQueryEnableSlotBasedExecutionEngine:true});
      > db.c.insert({a: 1})
      > db.c.createIndex({a: 1})
      > db.c.aggregate([{$match: {a: 1}}, {$count: "count"}]).itcount();

      The goal of this task is to implement support for the COUNT stage so that these kinds of queries work correctly when SBE mode is enabled.

              Assignee:
              Zixuan Zhuang
              Reporter:
              Drew Paroski
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: