summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_group_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "SERVER-45447 Add $accumulator for user-defined Javascript accumulators"Louis Williams2020-02-261-8/+12
| | | | This reverts commit 5b50a111c9361554bc7dbe6a8c63c885a5c29df6.
* SERVER-45447 Add $accumulator for user-defined Javascript accumulatorsDavid Percy2020-02-251-12/+8
|
* Revert "SERVER-45447 Add $accumulator for user-defined Javascript accumulators"David Percy2020-02-241-8/+12
| | | | This reverts commit 1315b6fdd3ade546c37364bcd4b0ba224adb7f58.
* SERVER-45447 Add $accumulator for user-defined Javascript accumulatorsDavid Percy2020-02-211-12/+8
|
* SERVER-43796 Fix unittests and compileJacob Evans2019-10-151-18/+29
|
* SERVER-42560 Simplify passing of metadata between DocumentSource and PlanStageIan Boros2019-10-101-1/+1
|
* SERVER-43367 unittest framework refactor/fixesBilly Donahue2019-10-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Segregate old-style dbtests into their own Suite initialization system: OldStyleSuiteSpecification. This is where the funky deprecated features can live on without interfering with the Suite API. It also gives us a searchable base class to identify them in the future. OldStyleSuite has `setupTests()` and an `add<T>()` that Suite does not have. Suite API can shrink when it doesn't have to support these dbtest adaptor features. Suite only needs non-template `add(name, callback)`. - Add OldStyleSuiteInitializer to some dbtests that were missing it! These didn't use SuiteInstance to register themselves and were incorrect. They would self register, resulting in _allSuites() holding a std::shared_ptr to a static-duration Suite object! - Change `getSuite()` to return `Suite&` instead of `Suite*`. - No more "self-registering" in Suite constructor. Registration must be done as a separate post-construction step. This removes some unusual lifetime management code and is easier to document. Suite::getSuite(name) is the only way to make a Suite, and it does the make_shared and registration calls with a pseudo-private ConstructorEnable idiom. - Suite->run() returns std::unique_ptr<Result> instead of raw `Result*`. It's virtual to support OldStyleSuite behavior. - Suite._ran does nothing. Removed. - Result.cur does nothing. Removed. - Switch to pass-by-value and std::move for most ctor args. - Add explicit on 1-arg ctors. - Get rid of TestHolder. It's just a 2-field struct. - use fmt instead of snprintf - TEST and TEST_F macros: generate TEST_TYPE once. - TEST and TEST_F macros: inline the _agent variable. - Mark _doRun as `override`. - Terminology: replace CASE_NAME with SUITE_NAME. - rename DeathTestImpl -> DeathTestBase - move getDeathTestPattern into the test as a static member function - refactor out some repetition from the comparator decl macros - use if-constexpr and diamond relops to clean up the ComparisonAssertion class. - dbtests: conditionally skip some add<T> calls - further dedup (DEATH_)TEST(_F) macros
* SERVER-42302 Move Document/Value library to db/exec/document_value directory.David Storch2019-10-011-2/+2
| | | | | | Document/Value is now used throughout the query execution engine, and therefore should move into the directory which holds query execution code.
* SERVER-43013 Translate Map Reduce to Agg PipelineJacob Evans2019-09-101-14/+1
|
* SERVER-41772 Apply clang-format 7.0.1 to the codebaseclang-format-7.0.12019-07-271-14/+18
|
* SERVER-39339 Remove `stdx/memory.h`ADAM David Alan Martin2019-06-101-1/+1
|
* SERVER-41180 Rename 'MergingLogic' to 'DistributedPlanLogic' to avoid ↵Arun Banala2019-05-241-6/+6
| | | | confusion with $merge
* SERVER-41053 Don't create ServiceContexts while doing updatesIan Boros2019-05-091-24/+27
| | | | This commit also renames DocumentSourceMock::create to DocumentSourceMock::createForTest.
* SERVER-40526 Make agg Expressions walkableJacob Evans2019-05-031-1/+14
|
* Revert "SERVER-40526 Make agg Expressions walkable"Jacob Evans2019-05-021-14/+1
| | | | This reverts commit e549f39cd70a51054a48aa8765558db6b03b1df3.
* SERVER-40526 Make agg Expressions walkableJacob Evans2019-05-011-1/+14
|
* SERVER-40056 Remove partial implementation of streaming $group.David Storch2019-03-111-310/+0
| | | | | | The streaming $group optimization was never fully implemented, so the code was disabled. This patch removes the dead code, including DocumentSource::getOutputSorts().
* 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-38311 Change out merging strategyCharlie Swanson2019-02-131-7/+6
| | | | | Allows an $out stage to run in parallel on all shards if the target collection is sharded and so is the input collection to the aggregate.
* Revert " SERVER-38311 Adjust $out merging strategy"Charlie Swanson2019-01-161-6/+7
| | | | This reverts commit 0cb2195939494660334db8e9d0a52509caeb621c.
* SERVER-38311 Adjust $out merging strategyCharlie Swanson2019-01-161-7/+6
|
* SERVER-17010 each Sorter instance spills to a single file rather than a new ↵Dianna Hohensee2018-10-311-3/+4
| | | | file per spill to disk
* SERVER-37651 Update header files with new licenseRamon Fernandez2018-10-221-14/+16
|
* SERVER-35905 Add logic to detect when $out is eligible for an exchangeCharlie Swanson2018-08-241-0/+38
|
* SERVER-33323 Refactor agg cursor merging on mongosCharlie Swanson2018-08-151-4/+5
| | | | | | | | | | This commit makes it so that aggregations will always use a $mergeCursors as a wrapper around a AsyncResultsMerger, which is new behavior for mongos. As part of this refactor, we can delete the concept of a 'merging presorted' $sort stage (which is now handled by the AsyncResultsMerger) and delete the DocumentSourceRouterAdapter stage which talked to a RouterStageMerge, instead directly using a $mergeCursors stage.
* SERVER-34798 Remove ServiceContext subclasses and use new ServiceContext in ↵Andy Schwerin2018-06-221-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | every unit test. This patch does several loosely related and surprisingly hard to separate things. 1.) Make the ServiceContext class final 2.) Create a mechanism, called ConstructorActions, for running methods on ServiceContexts immediately after they're built and immediately before they're destroyed. 3.) Introduce / improve test fixture base classes for tests, giving them fresh ServiceContext instances for each test case. There is one fixture for tests that need a storage engine and another for those that do not. 4.) Make several remaining global variables SC decorations in support of (3) 5.) Replace many MONGO_INITIALIZERS that access getGlobalServiceContext with the new constructor-actions system, which is needed for (3.) 6.) Fix up tests to use the fixtures from (3) and fix tests that silently used different service contexts in together in a technically illegal fashion that now breaks. 7.) Utilize (2) as necessary to simplify initialization of new ServiceContexts, simplifying the fixtures in (3).
* SERVER-35329 Package agg projection code for use outside of agg executionBernard Gorman2018-06-221-1/+1
|
* SERVER-35043, SERVER-22949: move geoNear implementation into aggregationKyle Suarez2018-06-181-1/+1
| | | | | | | | | | This commit removes the geoNear command and moves its implementation into the aggregation framework. Users should use the aggregate command with a $geoNear stage. The implementation rewrite additionally removes the limit in the $geoNear aggregation stage. To limit the number of results, use a $limit stage.
* SERVER-25596 Rename SplittableDocumentSource to NeedsMergerDocumentSourceKevinCybura2018-05-111-1/+1
| | | | | | Closes #1237 Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
* SERVER-29141 Enable change streams on sharded collectionsCharlie Swanson2017-10-091-3/+4
|
* SERVER-30871 Permit blocking aggregation stages to run on mongoS if ↵Bernard Gorman2017-09-271-1/+1
| | | | allowDiskUse is false
* SERVER-30899 Aggregations sent from a 3.4 mongos should serialize 3.4 metadataTess Avitabile2017-09-061-13/+13
|
* SERVER-30580 Eliminate UserException and MsgAssertionException typesMathias Stearn2017-08-161-5/+5
| | | | All users were converted to just use AssertionException.
* SERVER-18940 Optimise sharded aggregations that are targeted to a single shardBernard Gorman2017-08-021-1/+2
|
* SERVER-25980 Merge parallel vectors into one.ryankall2017-05-031-8/+8
| | | | | | | | | Merges the three parallel vectors in DocumentSourceGroup and DocumentSourceBucketAuto into one vector of AccumulationStatements. Closes #1143 Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
* SERVER-28651 Move agg var ownership to ExpressionContextJames Wahlin2017-04-291-10/+7
|
* SERVER-25535 Remove injectExpressionContext().Charlie Swanson2016-12-161-13/+13
| | | | | | | | | | | | | | | These methods were formally used to propagate a new ExpressionContext to stages, accumulators, or expressions which potentially needed to comparisons. Originally, this was necessary since Pipeline parsing happened outside of the collection lock and thus could not determine if there was a default collation on the collection. This meant that the collation could change after parsing and any operators that might compare strings would need to know about it. We have since moved parsing within the lock, so the collation can be known at parse time and the ExpressionContext should not change. This patch requires an ExpressionContext at construction time, and disallows changing the collation on an ExpressionContext.
* SERVER-25992 Remove Value(const char* value) constructorTess Avitabile2016-12-161-9/+9
|
* SERVER-22632 Split up document_source.h into one header per stage.Charlie Swanson2016-10-241-1/+2
|
* SERVER-24153 Add unit tests for DocumentSource pausing behavior.Charlie Swanson2016-09-121-0/+130
|
* SERVER-24153 Make DocumentSourceMock hold GetNextResultsCharlie Swanson2016-09-021-11/+13
| | | | | This is prep work for adding tests that all stages can correctly handle a kPauseExecution result.
* SERVER-24153 Split document_source_test.cpp into one file per stage.Charlie Swanson2016-09-011-0/+1048