| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Adds a new class, ViewResponseFormatter, for transforming aggregation responses
into responses for other commands with a dissimilar format (i.e. count and
distinct).
|
| |
|
|
|