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

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

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

      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@mongodb.com Zixuan Zhuang
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: