summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/cost_model
diff options
context:
space:
mode:
authorWill Buerger <will.buerger@mongodb.com>2023-01-20 20:11:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-20 21:17:33 +0000
commitc7e8520a934844d30c6fa9cb8e92cf3010c6d837 (patch)
tree4a66c78819535cd1a67b1c25a41c888fdeff18f9 /src/mongo/db/query/cost_model
parentd4c9920963d4475624eb58fc62ca0ce61f1f0846 (diff)
downloadmongo-c7e8520a934844d30c6fa9cb8e92cf3010c6d837.tar.gz
SERVER-72233: Do not explain Bindblock
Diffstat (limited to 'src/mongo/db/query/cost_model')
-rw-r--r--src/mongo/db/query/cost_model/cost_model_test.cpp53
1 files changed, 12 insertions, 41 deletions
diff --git a/src/mongo/db/query/cost_model/cost_model_test.cpp b/src/mongo/db/query/cost_model/cost_model_test.cpp
index 3a7dea46274..af6e2cfa4e5 100644
--- a/src/mongo/db/query/cost_model/cost_model_test.cpp
+++ b/src/mongo/db/query/cost_model/cost_model_test.cpp
@@ -72,7 +72,7 @@ TEST(CostModel, IncreaseIndexScanCost) {
ABT optimized = rootNode;
phaseManager.optimize(optimized);
- ASSERT_EXPLAIN_V2(
+ ASSERT_EXPLAIN_V2_AUTO(
"Root []\n"
"| | projections: \n"
"| | root\n"
@@ -85,16 +85,10 @@ TEST(CostModel, IncreaseIndexScanCost) {
"| | limit: 1\n"
"| | skip: 0\n"
"| Seek [ridProjection: rid_0, {'<root>': root}, c1]\n"
- "| | BindBlock:\n"
- "| | [root]\n"
- "| | Source []\n"
"| RefBlock: \n"
"| Variable [rid_0]\n"
- "IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: "
- "{=Const [1]}]\n"
- " BindBlock:\n"
- " [rid_0]\n"
- " Source []\n",
+ "IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index1, interval: {=Const "
+ "[1]}]\n",
optimized);
}
@@ -118,7 +112,7 @@ TEST(CostModel, IncreaseIndexScanCost) {
ABT optimized = rootNode;
phaseManager.optimize(optimized);
- ASSERT_EXPLAIN_V2(
+ ASSERT_EXPLAIN_V2_AUTO(
"Root []\n"
"| | projections: \n"
"| | root\n"
@@ -130,12 +124,7 @@ TEST(CostModel, IncreaseIndexScanCost) {
"| PathTraverse [1]\n"
"| PathCompare [Eq]\n"
"| Const [1]\n"
- "PhysicalScan [{'<root>': root, 'a': evalTemp_0}, c1]\n"
- " BindBlock:\n"
- " [evalTemp_0]\n"
- " Source []\n"
- " [root]\n"
- " Source []\n",
+ "PhysicalScan [{'<root>': root, 'a': evalTemp_0}, c1]\n",
optimized);
}
}
@@ -185,7 +174,7 @@ TEST(CostModel, IncreaseJoinsCost) {
ABT optimized = rootNode;
phaseManager.optimize(optimized);
- ASSERT_EXPLAIN_V2(
+ ASSERT_EXPLAIN_V2_AUTO(
"Root []\n"
"| | projections: \n"
"| | pa\n"
@@ -196,26 +185,13 @@ TEST(CostModel, IncreaseJoinsCost) {
"| | | rid_0 = rid_1\n"
"| | Collation\n"
"| | Ascending\n"
- "| Union []\n"
- "| | BindBlock:\n"
- "| | [rid_1]\n"
- "| | Source []\n"
- "| Evaluation []\n"
- "| | BindBlock:\n"
- "| | [rid_1]\n"
- "| | Variable [rid_0]\n"
+ "| Union [{rid_1}]\n"
+ "| Evaluation [{rid_1}]\n"
+ "| | Variable [rid_0]\n"
"| IndexScan [{'<rid>': rid_0}, scanDefName: c1, indexDefName: index2, interval: "
"{=Const [2]}]\n"
- "| BindBlock:\n"
- "| [rid_0]\n"
- "| Source []\n"
"IndexScan [{'<indexKey> 0': pa, '<rid>': rid_0}, scanDefName: c1, indexDefName: "
- "index1, interval: {=Const [1]}]\n"
- " BindBlock:\n"
- " [pa]\n"
- " Source []\n"
- " [rid_0]\n"
- " Source []\n",
+ "index1, interval: {=Const [1]}]\n",
optimized);
}
@@ -278,7 +254,7 @@ TEST(CostModel, IncreaseJoinsCost) {
ABT optimized = rootNode;
phaseManager.optimize(optimized);
- ASSERT_EXPLAIN_V2(
+ ASSERT_EXPLAIN_V2_AUTO(
"Root []\n"
"| | projections: \n"
"| | pa\n"
@@ -294,12 +270,7 @@ TEST(CostModel, IncreaseJoinsCost) {
"| | Variable [pa]\n"
"| PathCompare [Eq]\n"
"| Const [1]\n"
- "PhysicalScan [{'a': pa, 'b': evalTemp_1}, c1]\n"
- " BindBlock:\n"
- " [evalTemp_1]\n"
- " Source []\n"
- " [pa]\n"
- " Source []\n",
+ "PhysicalScan [{'a': pa, 'b': evalTemp_1}, c1]\n",
optimized);
}
}