summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2022-05-17 22:27:07 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-18 00:43:39 +0000
commit2f4aaaa0a8a182680a3ca9ff5a33581b34c55a55 (patch)
treec065db1ce298a815ed9b53ad3978a1b1273bd72b /src/mongo/db
parent2ea4597b881279053df1b809e64345fb72f35dcf (diff)
downloadmongo-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.cpp25
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);
+ }
}
}