summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/parsed_distinct.h
Commit message (Collapse)AuthorAgeFilesLines
* SERVER-40089 $group optimized with DISTINCT_SCAN cannot use $$ROOTJustin Seyster2019-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The getExecutorDistinct() function is responsible for both creating an executor for the distinct command and creating an executor for a $group that has been optimized with a DISTINCT_SCAN (see commit da63195). These two scenarios have different requirements for their projection, and getExecutorDistinct() distinguished the two by assuming any caller with an empty ({}) projection wanted the distinct command projection. However, a $first accumulator with $$ROOT requires the entire document, so the logic that builds an optimized $group executor generates an empty projection for this case as well. When that happens, getExecutorDistinct() mistakenly chooses the projection that the distinct command wants, and when the pipeline evaluates $$ROOT, it only gets to see a small subset of fields in the document. This patch modifies getExecutorDistinct() so that the caller must explicitly state what projection it wants. That means that the distinct command no longer passes an empty projection to indicate that it wants to project on just the distinct field. Instead, the distinct command computes the projection for the distinct field on its own and includes that projection in the ParsedDistinct object that it passes to getExecutorDistinct().
* SERVER-39560 - remove leading blank line on all C++ filesBilly Donahue2019-02-131-1/+0
| | | | | | Remove leading comments that are just stating the filename. Move any file-level comments below the copyright banner. Remove leading blank lines.
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-8/+10
|
* SERVER-28040 Fix maxTimeMS/readPref/readConcern for sharded view queryJames Wahlin2017-04-051-0/+1
|
* SERVER-27938 Rename all OperationContext variables to opCtxMaria van Keulen2017-03-071-1/+1
| | | | | | This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.
* SERVER-24762 Support for views on sharded collectionsJames Wahlin2016-07-291-1/+1
|
* SERVER-24766 views support for count and distinctKyle Suarez2016-07-211-0/+5
| | | | | | Adds a new class, ViewResponseFormatter, for transforming aggregation responses into responses for other commands with a dissimilar format (i.e. count and distinct).
* SERVER-24763 Make parse method for ParsedDistinct a public methodJames Wahlin2016-07-051-1/+21
|
* SERVER-24175 Distinct command should respect the collationTess Avitabile2016-06-061-0/+69