jstests/core/timeseries/timeseries_predicates.js
// by comparing the result on a time-series collection against a normal collection.
by comparing the result on a time-series collection against a normal collection.
by comparing the result on a time - series collection against a normal collection .
function checkPredicateResult(predicate, documents) {
    assert.commandWorked(coll.deleteMany({}));
    assert.commandWorked(bucketsColl.deleteMany({}));
    assert.commandWorked(coll.insert(documents));
    assert.commandWorked(tsColl.insert(documents));
    const normalResult = coll.aggregate({$match: predicate}).toArray();
    const tsResult = tsColl.aggregate({$match: predicate}).toArray();
    assert.sameMembers(normalResult, tsResult);
}
function checkPredicateResult ( predicate , documents ) { assert . commandWorked ( coll . deleteMany ( { } ) ) ; assert . commandWorked ( bucketsColl . deleteMany ( { } ) ) ; assert . commandWorked ( coll . insert ( documents ) ) ; assert . commandWorked ( tsColl . insert ( documents ) ) ; const normalResult = coll . aggregate ( { $match : predicate } ) . toArray ( ) ; const tsResult = tsColl . aggregate ( { $match : predicate } ) . toArray ( ) ; assert . sameMembers ( normalResult , tsResult ) ; }
by comparing the result on a time-series collection against a normal collection.
by comparing the result on a time - series collection against a normal collection .