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

Implement infrastructure for testing SBE stage builder

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.8.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Query 2020-11-02, Query 2020-11-16

      We need to establish a reliable mechanism to test the SBE stage builder to make sure we build correct sub-trees from a QuerySolutionNode tree.

      We consider two approaches to achieve this, but we need to make a further research and evaluate which one is preferrable.

      1. Use Explain format for SBE. Testing is done through integration tests. A query is executed with explain, which should output an SBE PlanStage tree in some defined JSON format, which can then be inspected to ensure that the return PlanStage tree is correct.
      2. Another approach is to use unittest infrastructure. We can construct a QuerySolutionNode tree and pass it through the stage builder. We can use some helpers and exploit the QueryPlanner to produce a QuerySolutionNode tree.

            Assignee:
            eric.cox@mongodb.com Eric Cox (Inactive)
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: