diff options
author | Alexander Ignatyev <alexander.ignatyev@mongodb.com> | 2022-04-08 19:54:43 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-08 20:38:36 +0000 |
commit | 1b566250b621e13feaea360cda87d118c8e32d2a (patch) | |
tree | 07fb6068c094dbf647b851d0f10a84bd5ab0e1be /src/mongo/db/query/planner_access.cpp | |
parent | 4bd9a92a46797f25bcca6383e074b2389f760c3e (diff) | |
download | mongo-1b566250b621e13feaea360cda87d118c8e32d2a.tar.gz |
SERVER-65367 Fix IET build for wildcard indexes and elemMatch
Diffstat (limited to 'src/mongo/db/query/planner_access.cpp')
-rw-r--r-- | src/mongo/db/query/planner_access.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/query/planner_access.cpp b/src/mongo/db/query/planner_access.cpp index 58d85e5f0cf..caf77f4847c 100644 --- a/src/mongo/db/query/planner_access.cpp +++ b/src/mongo/db/query/planner_access.cpp @@ -907,7 +907,7 @@ void QueryPlannerAccess::finishAndOutputLeaf(ScanBuildingState* scanState, vector<std::unique_ptr<QuerySolutionNode>>* out) { finishLeafNode(scanState->currentScan.get(), scanState->indices[scanState->currentIndexNumber], - scanState->ietBuilders); + std::move(scanState->ietBuilders)); if (MatchExpression::OR == scanState->root->matchType()) { if (orNeedsFetch(scanState)) { @@ -941,7 +941,7 @@ void QueryPlannerAccess::finishAndOutputLeaf(ScanBuildingState* scanState, void QueryPlannerAccess::finishLeafNode( QuerySolutionNode* node, const IndexEntry& index, - const std::vector<interval_evaluation_tree::Builder>& ietBuilders) { + std::vector<interval_evaluation_tree::Builder> ietBuilders) { const StageType type = node->getType(); if (STAGE_TEXT_MATCH == type) { @@ -967,7 +967,7 @@ void QueryPlannerAccess::finishLeafNode( // If this is a $** index, update and populate the keyPattern, bounds, and multikeyPaths. if (index.type == IndexType::INDEX_WILDCARD) { - wcp::finalizeWildcardIndexScanConfiguration(scan); + wcp::finalizeWildcardIndexScanConfiguration(scan, &ietBuilders); } } @@ -1357,9 +1357,9 @@ bool QueryPlannerAccess::processIndexScansElemMatch( verify(IndexTag::kNoIndex == scanState->currentIndexNumber); } - scanState->currentIndexNumber = scanState->ixtag->index; + // Reset state before producing a new leaf. + scanState->resetForNextScan(scanState->ixtag, query.isParameterized()); - scanState->tightness = IndexBoundsBuilder::INEXACT_FETCH; scanState->currentScan = makeLeafNode(query, indices[scanState->currentIndexNumber], scanState->ixtag->pos, @@ -1668,7 +1668,7 @@ std::unique_ptr<QuerySolutionNode> QueryPlannerAccess::_buildIndexedDataAccess( auto soln = makeLeafNode(query, index, tag->pos, root, &tightness, ietBuilder); verify(nullptr != soln); - finishLeafNode(soln.get(), index, ietBuilders); + finishLeafNode(soln.get(), index, std::move(ietBuilders)); if (!ownedRoot) { // We're performing access planning for the child of an array operator such as |