PlanExplainerSBEBase was introduced by SERVER-85240 (a882cdaa0e6) to share SBE-tree logic between two subclasses: PlanExplainerSBE (for the SBE runtime planners) and PlanExplainerClassicRuntimePlannerForSBE.
SERVER-93684 (0b750be4288) removed PlanExplainerSBE along with the SBE runtime planners, but left the base class in place. Since then there has been exactly one derived class, so the split shares nothing: every member of the base (_root, _rootData, _estimates, getWinningPlanStats(), buildExecPlanDebugInfo()) has a single caller.
Proposed: merge the two classes into one. This also lets getPlanEntries() drop its
virtual/override pair, which today exists only so the subclass can fall back to
the base implementation for the QuerySolution-derived paths (join optimization, and when
no classic runtime planner stage was handed over); those become private helpers.
Secondary benefit: PlanExplainerSBEBase has no pure virtuals of its own, so nothing
prevents constructing it directly and silently getting QuerySolution-only per-plan
behavior. Merging removes that footgun.
- is related to
-
SERVER-93684 Delete SBE Multiplanner PlanExplainer factory function (and its uses)
-
- Closed
-
-
SERVER-85240 Correctly fill rejectedPlans and allPlansExecution when using classic multi-planner with SBE
-
- Closed
-