Commit Graph

214 Commits

Author SHA1 Message Date
Charlie Swanson
52cd830b71 SERVER-25473 Inject ExpressionContext before optimizing pipeline. 2016-08-11 18:25:07 -04:00
Max Hirschhorn
5149b0f8a5 SERVER-25005 Use Pipeline to execute $lookup and $graphLookup.
Replaces the usages of DBDirectClient::query() in DocumentSourceLookUp
and DocumentSourceGraphLookUp to instead parse and execute a Pipeline.

Simplifies the registration process of the "inner" plan execution in an
aggregation pipeline. The DocumentSourceCursor class now owns its
PlanExecutor and the PipelineProxyStage class no longer has a
std::weak_ptr to it. The "inner" plan executor is registered with the
CursorManager of the underlying Collection and will receive invalidation
notifications if a catalog operation occurs.
2016-08-04 12:49:28 -04:00
Sally McNichols
39d63ea21d SERVER-24152 add $bucketAuto aggregation stage 2016-07-26 17:52:36 -04:00
Charlie Swanson
a8414a21ef SERVER-25054 Error if aggregation uses text score without text search. 2016-07-14 16:18:39 -04:00
Geert Bosch
b62dcab903 SERVER-24766 Rename error code 15999 to InvalidPipelineOperator 2016-07-13 13:48:28 -04:00
Sally McNichols
f3919fcaa8 SERVER-24302 Make "as" option of $filter and $map default to "this" 2016-06-30 14:13:27 -04:00
Charlie Swanson
752eb0f448 SERVER-18966 Add the ability to exclude fields in $project stage 2016-06-24 18:07:36 -04:00
Charlie Swanson
20e9b2798d SERVER-24638 Move command processing from Pipeline to AggregationRequest 2016-06-24 11:51:20 -04:00
Kaloian Manassiev
2477b8c33b SERVER-22512 Remove unnecessary calls to stopBalancer 2016-06-09 13:13:05 -04:00
Geert Bosch
00ed8f3b27 SERVER-19735: Add support for decimal type in aggregation 2016-06-06 13:22:34 -04:00
Mark Benvenuto
6dcdd23dd3 SERVER-23971 Clang-Format code 2016-05-28 17:55:12 -04:00
David Hows
fee016c605 SERVER-24068 - Disable test server21632.js when running with WiredTiger LSM 2016-05-17 05:42:22 +10:00
James Wahlin
0ffad2b98d SERVER-23896 Additional tests for ExpressionMod 2016-05-09 08:59:46 -04:00
Benjamin Murphy
6bd6589e80 SERVER-14670 Aggregation supports strLenCP and strLenBytes. 2016-03-29 15:21:06 -04:00
Charlie Swanson
f23e588c18 SERVER-22881 Expand arrays during $lookup's query.
If the value in 'localField' is an array, assume that it corresponds to
multiple entries in the foreign collection. The query to the foreign
collection will use a $in predicate, except when a regex is present, in
which case it will use a series of $eq predicates within an $or.
2016-03-29 15:06:54 -04:00
Jens Fahnenbruck
ea07e34466 SERVER-7695 Add ISO versions of date expressions.
Implements expressions for dealing with week as described in the
ISO-8601 standard (https://en.wikipedia.org/wiki/ISO_week_date).

Also implements the %G, %V, and %u specifiers for $dateToString.

Closes #1068
2016-03-29 12:22:11 -04:00
Benjamin Murphy
60f636afea SERVER-20163 Aggregation now supports the zip expression. 2016-03-25 11:29:43 -04:00
Benjamin Murphy
5afa97da4c SERVER-22580 Aggregation now supports substrCP. 2016-03-25 10:37:50 -04:00
Benjamin Murphy
f4bbde02ba SERVER-4507 Group stages now take advantage of sorted input sequences. 2016-03-24 11:05:32 -04:00
Benjamin Murphy
f40294818c SERVER-20169 Aggregation now supports the range expressin. 2016-03-24 10:59:06 -04:00
Mike Grundy
1be713cebb SERVER-23067 Final round of JS linting and formatting 2016-03-18 17:10:31 -04:00
Benjamin Murphy
a40991b77d SERVER-23029 Added reverseArray expression to aggregation. 2016-03-15 12:24:53 -04:00
Jonathan Abrahams
4ae691e8ed SERVER-22468 Format JS code with approved style in jstests/ 2016-03-09 12:18:14 -05:00
Benjamin Murphy
aee9f7e2a9 SERVER-22093 Aggregation uses a COUNT plan when no fields are needed from input documents. 2016-03-04 10:05:05 -05:00
Max Hirschhorn
e1928f36d2 SERVER-22537 Fix DBDirectClient's OperationContext not getting updated.
This fixes an issue where the DBDirectClient used by the $lookup stage
would have the previous OperationContext and trigger an invalid memory
access when sending a getMore request as it unwinds the results.

Calling PipelineProxyStage::doDetachFromOperationContext() now causes
the DBDirectClient's OperationContext to be set to nullptr, and
PipelineProxyStage::doReattachToOperationContext() causes it to be set
to the current OperationContext.
2016-02-29 10:47:18 -05:00
Dianna Hohensee
66746f4654 SERVER-22870 rename getServerName and getServer 2016-02-26 17:10:54 -05:00
Benjamin Murphy
dd1fb77f48 SERVER-22402 DocumentSourceMatch now includes dependency tracking. 2016-02-26 10:56:01 -05:00
Mike Grundy
bca7050e6f SERVER-22341 fix jslint errors in jstests/aggregation with eslint --fix 2016-02-05 15:00:49 -05:00
Charlie Swanson
8d9c1a2cae SERVER-21632 Add test to stress $sample as first stage 2016-02-04 19:38:27 -05:00
Santiago Alessandri
83afa046ee SERVER-18957 Separate isAssociativeAndCommutative into two functions.
Closes #1024

Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
2016-02-02 10:07:36 -05:00
Jonathan Abrahams
42161c2622 SERVER-20519 Set random seed, assert if seed not set and random function is invoked. 2015-12-31 10:22:29 -05:00
Jonathan Reams
338f764be0 SERVER-6102 Deserialize BSON undefined as JS undefined 2015-11-11 11:12:17 -05:00
Kaloian Manassiev
706ac90265 SERVER-21186 Make all sharding tests use default verbosity of 1
The default ShardingTest verbosity is currently zero, but we have many
tests, which bump it to 1 and even higher.

Since verbosity level of 0 is sometimes insufficient for investigating
transient failures, this change makes the default to be 1 and removes all
places, which explicitly make it 1 or higher.
2015-11-11 11:01:18 -05:00
Mathias Stearn
f79d188718 SERVER-21287 $lookup should always make $eq queries 2015-11-04 13:53:03 -05:00
Charlie Swanson
2cc2d7da2b SERVER-19095 Move $lookup to community edition 2015-10-30 12:06:19 -04:00
James Wahlin
97da4befad SERVER-20969 Restrict $indexStats to first pipeline stage 2015-10-28 15:44:02 -04:00
David Storch
737bb20fcb SERVER-20935 do not attempt to attach shard version to OpCtx inside direct client 2015-10-22 13:40:06 -04:00
Charlie Swanson
c7ddaa120d SERVER-20168 Empty array should not be present in document after $unwind 2015-10-07 16:11:46 -04:00
Charlie Swanson
9c46f95145 SERVER-20595 The includeArrayIndex option to $unwind should specify a path 2015-10-07 16:11:45 -04:00
Ramon Fernandez
114ad4ae31 SERVER-20696 make testing TZ-independent 2015-10-01 10:57:40 -04:00
Charlie Swanson
522f5a2bff SERVER-4588 Add option to $unwind stage to include array index in output
Adds a includeArrayIndex option to the $unwind stage. If this option is
specified, the $unwind stage will output values with the structure {index:
<array index>, value: <array value>} instead of just the array value.

Note this does not affect the behavior non-arrays or empty arrays. If
includeArrayIndex and preserveNullAndEmptyArrays are both specified, values
from a non-empty array will have an index attached, and all other values will
pass through unchanged.
2015-09-11 15:30:11 -04:00
Charlie Swanson
3cb6039e5d SERVER-20168 Add option to $unwind stage for treatment of nullish values
Adds a preserveNullAndEmptyArrays option to the $unwind stage. If this option
is specified, the $unwind stage will allow documents with nullish values for
the specified unwinding path, or those with an empty array as the value for
that path, to pass through unaltered.

Note this does not affect the behavior of non-nullish, non-array values.
2015-09-11 15:30:11 -04:00
Charlie Swanson
b8450fd52c SERVER-19182 Avoid crash during pipeline with an initial $sample stage on a non-existent collection 2015-08-27 15:07:21 -04:00
Charlie Swanson
843fd8ae34 SERVER-12015 Re-enable use of covering indices in an aggregation pipeline 2015-08-27 13:01:50 -04:00
Spencer T Brody
0d61a38662 SERVER-19855 Use ShardConnection for migrations and splits
This reverts commit 169a7ca486.
2015-08-25 15:00:48 -04:00
Benety Goh
169a7ca486 Revert "SERVER-19855 Use ShardConnection for migrations and splits"
This reverts commit fdc2aec174.
2015-08-21 22:16:04 -04:00
Kaloian Manassiev
fdc2aec174 Revert "Revert "SERVER-19855 Use ShardConnection for migrations and splits""
This reverts commit bae1d256c5.
2015-08-21 17:00:14 -04:00
Kaloian Manassiev
bae1d256c5 Revert "SERVER-19855 Use ShardConnection for migrations and splits"
This reverts commit f8cdaf32b6.
2015-08-21 13:12:16 -04:00
Kaloian Manassiev
f8cdaf32b6 SERVER-19855 Use ShardConnection for migrations and splits
This ensures that prior to sending the operation on the wire, the host
will be primed to know that it is part of a sharded cluster.
2015-08-21 12:10:38 -04:00
James Cohan
f9828f5a03 SERVER-9625 Makes $sum, $avg, $min, $max, $stdDevPop, and $stdDevSamp accumulators available as expressions 2015-08-11 17:08:41 -04:00