diff options
Diffstat (limited to 'src/mongo/db/exec/fetch.cpp')
| -rw-r--r-- | src/mongo/db/exec/fetch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/exec/fetch.cpp b/src/mongo/db/exec/fetch.cpp index 2059faf7d79..9d51dad5ca4 100644 --- a/src/mongo/db/exec/fetch.cpp +++ b/src/mongo/db/exec/fetch.cpp @@ -181,8 +181,10 @@ unique_ptr<PlanStageStats> FetchStage::getStats() { _commonStats.isEOF = isEOF(); // Add a BSON representation of the filter to the stats tree, if there is one. - if (_filter) { - _commonStats.filter = _filter->serialize(); + if (nullptr != _filter) { + BSONObjBuilder bob; + _filter->serialize(&bob); + _commonStats.filter = bob.obj(); } unique_ptr<PlanStageStats> ret = std::make_unique<PlanStageStats>(_commonStats, STAGE_FETCH); |
