summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2023-05-03 20:29:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-03 22:05:48 +0000
commitf1c4f86d1b5ae01a6823fe67c6b3922fe393b2d5 (patch)
tree4ac514f60926ab89ad3600d847dd8901a4e456d3 /src/mongo/db/exec
parent9cf95efcbd37df83bcd9af4593e79c51ea4062ea (diff)
downloadmongo-f1c4f86d1b5ae01a6823fe67c6b3922fe393b2d5.tar.gz
SERVER-74822 Remove buffering with deque in BSONColumn
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r--src/mongo/db/exec/timeseries/bucket_unpacker.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mongo/db/exec/timeseries/bucket_unpacker.cpp b/src/mongo/db/exec/timeseries/bucket_unpacker.cpp
index dc6fa8d507b..91f92c3523c 100644
--- a/src/mongo/db/exec/timeseries/bucket_unpacker.cpp
+++ b/src/mongo/db/exec/timeseries/bucket_unpacker.cpp
@@ -304,17 +304,13 @@ private:
: column(elem),
it(column.begin()),
end(column.end()),
- hashedName(FieldNameHasher{}(column.name())) {}
- ColumnStore(ColumnStore&& other)
- : column(std::move(other.column)),
- it(other.it.moveTo(column)),
- end(other.end),
- hashedName(other.hashedName) {}
+ fieldName(elem.fieldNameStringData(), FieldNameHasher{}(elem.fieldNameStringData())) {
+ }
BSONColumn column;
BSONColumn::Iterator it;
BSONColumn::Iterator end;
- size_t hashedName;
+ HashedFieldName fieldName;
};
// Iterates the timestamp section of the bucket to drive the unpacking iteration.
@@ -367,8 +363,7 @@ bool BucketUnpackerV2::getNext(MutableDocument& measurement,
const BSONElement& elem = *fieldColumn.it;
// EOO represents missing field
if (!elem.eoo()) {
- measurement.addField(HashedFieldName{fieldColumn.column.name(), fieldColumn.hashedName},
- Value{elem});
+ measurement.addField(fieldColumn.fieldName, Value{elem});
}
++fieldColumn.it;
}
@@ -400,7 +395,7 @@ bool BucketUnpackerV2::getNext(BSONObjBuilder& builder,
const BSONElement& elem = *fieldColumn.it;
// EOO represents missing field
if (!elem.eoo()) {
- builder.appendAs(elem, fieldColumn.column.name());
+ builder.appendAs(elem, fieldColumn.fieldName.key());
}
++fieldColumn.it;
}
@@ -432,8 +427,7 @@ void BucketUnpackerV2::extractSingleMeasurement(
for (auto& fieldColumn : _fieldColumns) {
auto val = fieldColumn.column[j];
uassert(6067600, "Bucket unexpectedly contained fewer values than count", val);
- measurement.addField(HashedFieldName{fieldColumn.column.name(), fieldColumn.hashedName},
- Value{*val});
+ measurement.addField(fieldColumn.fieldName, Value{*val});
}
}
}