diff options
author | Martin Neupauer <martin.neupauer@mongodb.com> | 2022-01-14 19:17:03 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-01-14 20:50:30 +0000 |
commit | 5a86a7dfff7743a7ac2dc9484fc854351c253f69 (patch) | |
tree | 101c6c32d2c2e9d2749b3b08727ca76a765a6f01 /src/mongo/db/query/plan_executor_sbe.cpp | |
parent | 94d5eb0aba620a65439f0252377d74dd7683f485 (diff) | |
download | mongo-5a86a7dfff7743a7ac2dc9484fc854351c253f69.tar.gz |
SERVER-61630 support a string form of RecordId
Diffstat (limited to 'src/mongo/db/query/plan_executor_sbe.cpp')
-rw-r--r-- | src/mongo/db/query/plan_executor_sbe.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/query/plan_executor_sbe.cpp b/src/mongo/db/query/plan_executor_sbe.cpp index acd7a746988..d15daede90e 100644 --- a/src/mongo/db/query/plan_executor_sbe.cpp +++ b/src/mongo/db/query/plan_executor_sbe.cpp @@ -329,7 +329,9 @@ BSONObj PlanExecutorSBE::getPostBatchResumeToken() const { "but found a result without a valid RecordId: " << msgTag, tag == sbe::value::TypeTags::RecordId); - return BSON("$recordId" << sbe::value::bitcastTo<int64_t>(val)); + BSONObjBuilder builder; + sbe::value::getRecordIdView(val)->serializeToken("$recordId", &builder); + return builder.obj(); } } @@ -383,7 +385,7 @@ sbe::PlanState fetchNext(sbe::PlanStage* root, invariant(recordIdSlot); auto [tag, val] = recordIdSlot->getViewOfValue(); if (tag == sbe::value::TypeTags::RecordId) { - *dlOut = RecordId{sbe::value::bitcastTo<int64_t>(val)}; + *dlOut = *sbe::value::getRecordIdView(val); } } return state; |