summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
+ }
}
}