diff options
author | Ben Shteinfeld <ben.shteinfeld@mongodb.com> | 2023-04-10 21:30:02 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-10 23:29:42 +0000 |
commit | 9fd56c17736f2e6557e5a91c6d607040ec191289 (patch) | |
tree | 103a2eeb801619e09f6f8e9dce362f07f4b155c4 /jstests/libs | |
parent | ae16cf75e35a7a6e0dc0da817044a55eaee3e9c1 (diff) | |
download | mongo-9fd56c17736f2e6557e5a91c6d607040ec191289.tar.gz |
SERVER-72814 Add $_internalEqHash MatchExpression
Diffstat (limited to 'jstests/libs')
-rw-r--r-- | jstests/libs/analyze_plan.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/jstests/libs/analyze_plan.js b/jstests/libs/analyze_plan.js index eea90ac4994..308119d5262 100644 --- a/jstests/libs/analyze_plan.js +++ b/jstests/libs/analyze_plan.js @@ -185,7 +185,8 @@ function hasRejectedPlans(root) { * Returns an array of execution stages from the given replset or sharded explain output. */ function getExecutionStages(root) { - if (root.executionStats.executionStages.hasOwnProperty("shards")) { + if (root.hasOwnProperty("executionStats") && + root.executionStats.executionStages.hasOwnProperty("shards")) { const executionStages = []; for (let shard of root.executionStats.executionStages.shards) { executionStages.push(Object.assign( @@ -194,6 +195,13 @@ function getExecutionStages(root) { } return executionStages; } + if (root.hasOwnProperty("shards")) { + const executionStages = []; + for (const shard in root.shards) { + executionStages.push(root.shards[shard].executionStats.executionStages); + } + return executionStages; + } return [root.executionStats.executionStages]; } |