summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/plan_explainer.h
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2021-01-18 22:06:40 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-01-30 03:46:12 +0000
commitc088ca3d8fef6d806f92ea2d5869d8910e5cd30c (patch)
treee5d69b3273488d9d0c9aa2894184cc8a7545aac9 /src/mongo/db/query/plan_explainer.h
parentc08203fe14a89e789b7dc5353c427e34c4c2b31e (diff)
downloadmongo-c088ca3d8fef6d806f92ea2d5869d8910e5cd30c.tar.gz
SERVER-53270 Include SBE PlanStage tree string into explain output
Diffstat (limited to 'src/mongo/db/query/plan_explainer.h')
-rw-r--r--src/mongo/db/query/plan_explainer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_explainer.h b/src/mongo/db/query/plan_explainer.h
index 96f18f8d9ed..e6d19e32470 100644
--- a/src/mongo/db/query/plan_explainer.h
+++ b/src/mongo/db/query/plan_explainer.h
@@ -50,6 +50,11 @@ static constexpr int kMaxExplainStatsBSONSizeMB = 10 * 1024 * 1024;
class PlanExplainer {
public:
/**
+ * A version of the explain format. "1" is used for the classic engine and "2" for SBE.
+ */
+ using ExplainVersion = std::string;
+
+ /**
* This pair holds a serialized BSON document that details the plan selected by the query
* planner, and optional summary stats for an execution tree if the verbosity level for the
* generated stats is 'executionStats' or higher. The format of these stats are opaque to the
@@ -66,6 +71,11 @@ public:
virtual ~PlanExplainer() = default;
/**
+ * Returns a version of the explain format supported by this explainer.
+ */
+ virtual const ExplainVersion& getVersion() const = 0;
+
+ /**
* Returns 'true' if this PlanExplainer can provide information on the winning plan and rejected
* candidate plans, meaning that the QueryPlanner generated multiple candidate plans and the
* winning plan was chosen by the multi-planner.