-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
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.
- 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.
- 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.