SERVER-139118ClosedFixed

Have SBE plan trialing produce Documents instead of BSON when document sources follow

When a single solution plan uses SBE, we lower the QSN to SBE and execute through {{PlanExecutorSBE}} which is aware of whether it needs to [produce BSON or Documents|https://github.com/10gen/mongo/blob/5d9e8a85d4eadd4ba300cc1e0db8b6a6e69abea2/src/mongo/db/query/plan_executor_sbe.cpp#L371-L379]. If a document source follows the SBE plan, we produce Documents since this is the representation they use. Otherwise if the SBE plan is the end of execution, it can produce BSON to return to the user. W

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1026
Components
Server components related to this issue
Query Execution
Labels
Tags and classification

No labels assigned.