[SERVER-50885] Add tests for the "sbe" command Created: 11/Sep/20  Updated: 29/Oct/23  Resolved: 24/Mar/21

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Andrii Dobroshynski (Inactive)
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-02-22, Query Execution 2021-03-08, Query Execution 2021-03-22, Query Execution 2021-04-05
Participants:

 Description   

The "sbe" command is an internal, test-only command, used for testing and debugging purposes, which directly executes a query execution plan expressed as an SBE string. Although this command is not exposed to users, it would still be a good idea to have some test coverage for it. We currently have none. Regression tests will provide us with a means to make sure that we have not broken the "sbe" command as we continue to develop the SBE engine.

We should be able to add tests which call the "sbe" command to the jsCore suite, since the SBE engine does not need to be enabled in order to run it.

We have discovered some inconsistencies between SBE parser and debug print of SBE stages. It would be nice if we could fix them in the scope of this ticket too:

  • IXSCAN, IXSEEK - slots are assigned to different values after serialization/deserialization loop
  • PROJECT - serialization works correct, but the order of slot assignments is not preserved which
    prevents us from comparing debug outputs as strings
  • MKOBJ - parser does not recognize 'forceNewObject' and 'returnOldObject' flags from debug print
  • GROUP - slots are assigned to different values after serialization/deserialization loop
  • LIMIT, SKIP - parser does not recognize 'limitskip' keyword produced by 'LimitSkipStage'
  • TRAVERSE - parser does not recognize correlated slots from debug print
  • SORT - parser does not recognize 'limit' field from debug print
  • UNION - debug print does not output square braces around union branches list
  • SCAN, SEEK - parser expects forward flag which is not included in the debug print
  • HJOIN - inner and outer projects are swapped after serialization/deserialization loop


 Comments   
Comment by Githook User [ 23/Mar/21 ]

Author:

{'name': 'Andrii Dobroshynski', 'email': 'andrii.dobroshynski@mongodb.com', 'username': 'dobroshynski'}

Message: SERVER-50885 Add tests for the "sbe" command and fix discrepancies between parser and debugPrint()
Branch: master
https://github.com/mongodb/mongo/commit/88abec1d0bf396e53dc7d9ea94e43ffd469cd90e

Generated at Thu Feb 08 05:23:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.