jstests/core/timeseries/timeseries_index_partial.js
// partialFilterExpression is what we expect.
partialFilterExpression is what we expect.
partialFilterExpression is what we expect .
function checkPredicateOK({input: predicate, output: expectedBucketPredicate}) {
        const name = 'example_pushdown_index';
        assert.commandWorked(coll.createIndex({a: 1}, {name, partialFilterExpression: predicate}));
        const indexes = buckets.getIndexes().filter(ix => ix.name === name);
        assert.eq(1, indexes.length, "Expected 1 index but got " + tojson(indexes));
        const actualBucketPredicate = indexes[0].partialFilterExpression;
        assert.eq(actualBucketPredicate,
                  expectedBucketPredicate,
                  "Expected the bucket-level predicate to be " + tojson(expectedBucketPredicate) +
                      " but it was " + tojson(actualBucketPredicate));
        assert.commandWorked(coll.dropIndex(name));
    }
function checkPredicateOK ( { input : predicate , output : expectedBucketPredicate } ) { const name = 'example_pushdown_index' ; assert . commandWorked ( coll . createIndex ( { a : 1 } , { name , partialFilterExpression : predicate } ) ) ; const indexes = buckets . getIndexes ( ) . filter ( ix => ix . name === name ) ; assert . eq ( 1 , indexes . length , "Expected 1 index but got " + tojson ( indexes ) ) ; const actualBucketPredicate = indexes [ 0 ] . partialFilterExpression ; assert . eq ( actualBucketPredicate , expectedBucketPredicate , "Expected the bucket-level predicate to be " + tojson ( expectedBucketPredicate ) + " but it was " + tojson ( actualBucketPredicate ) ) ; assert . commandWorked ( coll . dropIndex ( name ) ) ; }
partialFilterExpression is what we expect.
partialFilterExpression is what we expect .