diff options
author | Ian Boros <ian.boros@mongodb.com> | 2022-05-17 22:27:07 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-18 00:43:39 +0000 |
commit | 2f4aaaa0a8a182680a3ca9ff5a33581b34c55a55 (patch) | |
tree | c065db1ce298a815ed9b53ad3978a1b1273bd72b /src/mongo/db | |
parent | 2ea4597b881279053df1b809e64345fb72f35dcf (diff) | |
download | mongo-2f4aaaa0a8a182680a3ca9ff5a33581b34c55a55.tar.gz |
SERVER-66507 Fix row store fetch bug in column indexes
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/exec/sbe/stages/column_scan.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mongo/db/exec/sbe/stages/column_scan.cpp b/src/mongo/db/exec/sbe/stages/column_scan.cpp index 0cc99871da1..8058307a916 100644 --- a/src/mongo/db/exec/sbe/stages/column_scan.cpp +++ b/src/mongo/db/exec/sbe/stages/column_scan.cpp @@ -381,18 +381,19 @@ PlanState ColumnScanStage::getNext() { splitCellView = SplitCellView::parse(lastCell->value); } - if (splitCellView && (splitCellView->hasSubPaths || splitCellView->hasDuplicateFields)) { - useRowStore = true; - } else if (!useRowStore && _columnCursors[i].includeInOutput()) { - if (!splitCellView || splitCellView->isSparse) { - // Must read in the parent information first. - readParentsIntoObj(path, &outObj, &parentPathsRead); - } - - if (splitCellView) { - auto translatedCell = translateCell(path, *splitCellView); - - addCellToObject(translatedCell, outObj); + if (_columnCursors[i].includeInOutput() && !useRowStore) { + if (splitCellView && + (splitCellView->hasSubPaths || splitCellView->hasDuplicateFields)) { + useRowStore = true; + } else { + if (!splitCellView || splitCellView->isSparse) { + // Must read in the parent information first. + readParentsIntoObj(path, &outObj, &parentPathsRead); + } + if (splitCellView) { + auto translatedCell = translateCell(path, *splitCellView); + addCellToObject(translatedCell, outObj); + } } } |