diff options
author | Dan Larkin-York <dan.larkin-york@mongodb.com> | 2022-03-21 19:21:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-21 21:48:27 +0000 |
commit | 85409b314c52efaa1987d50291f2779dfa314328 (patch) | |
tree | 0975c4b9ab98ea336ced8f44c707d6f44b8c3117 /src/mongo/db/cst | |
parent | 0f9843968b1656cd1287d33f16508368fd5d7b2a (diff) | |
download | mongo-85409b314c52efaa1987d50291f2779dfa314328.tar.gz |
SERVER-64602 Provide time-series bucket time bounds as document metadata for use by bounded sorter
Diffstat (limited to 'src/mongo/db/cst')
-rw-r--r-- | src/mongo/db/cst/cst_pipeline_translation.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/cst/key_value.h | 50 |
2 files changed, 32 insertions, 24 deletions
diff --git a/src/mongo/db/cst/cst_pipeline_translation.cpp b/src/mongo/db/cst/cst_pipeline_translation.cpp index 36244d87fa3..ca85a8884a0 100644 --- a/src/mongo/db/cst/cst_pipeline_translation.cpp +++ b/src/mongo/db/cst/cst_pipeline_translation.cpp @@ -217,6 +217,12 @@ auto translateMeta(const CNode::ObjectChildren& object, ExpressionContext* expCt return make_intrusive<ExpressionMeta>(expCtx, DocumentMetadataFields::kSortKey); case KeyValue::textScore: return make_intrusive<ExpressionMeta>(expCtx, DocumentMetadataFields::kTextScore); + case KeyValue::timeseriesBucketMaxTime: + return make_intrusive<ExpressionMeta>(expCtx, + DocumentMetadataFields::kTimeseriesBucketMaxTime); + case KeyValue::timeseriesBucketMinTime: + return make_intrusive<ExpressionMeta>(expCtx, + DocumentMetadataFields::kTimeseriesBucketMinTime); default: MONGO_UNREACHABLE; } diff --git a/src/mongo/db/cst/key_value.h b/src/mongo/db/cst/key_value.h index 3750c94948b..cad3160b939 100644 --- a/src/mongo/db/cst/key_value.h +++ b/src/mongo/db/cst/key_value.h @@ -35,30 +35,32 @@ namespace mongo { -#define KEYVALUES(ENUMIFY) \ - ENUMIFY(absentKey) \ - ENUMIFY(decimalNegOneKey) \ - ENUMIFY(decimalOneKey) \ - ENUMIFY(decimalZeroKey) \ - ENUMIFY(doubleNegOneKey) \ - ENUMIFY(doubleOneKey) \ - ENUMIFY(doubleZeroKey) \ - ENUMIFY(falseKey) \ - ENUMIFY(geoNearDistance) \ - ENUMIFY(geoNearPoint) \ - ENUMIFY(indexKey) \ - ENUMIFY(intNegOneKey) \ - ENUMIFY(intOneKey) \ - ENUMIFY(intZeroKey) \ - ENUMIFY(longNegOneKey) \ - ENUMIFY(longOneKey) \ - ENUMIFY(longZeroKey) \ - ENUMIFY(randVal) \ - ENUMIFY(recordId) \ - ENUMIFY(searchHighlights) \ - ENUMIFY(searchScore) \ - ENUMIFY(sortKey) \ - ENUMIFY(textScore) \ +#define KEYVALUES(ENUMIFY) \ + ENUMIFY(absentKey) \ + ENUMIFY(decimalNegOneKey) \ + ENUMIFY(decimalOneKey) \ + ENUMIFY(decimalZeroKey) \ + ENUMIFY(doubleNegOneKey) \ + ENUMIFY(doubleOneKey) \ + ENUMIFY(doubleZeroKey) \ + ENUMIFY(falseKey) \ + ENUMIFY(geoNearDistance) \ + ENUMIFY(geoNearPoint) \ + ENUMIFY(indexKey) \ + ENUMIFY(intNegOneKey) \ + ENUMIFY(intOneKey) \ + ENUMIFY(intZeroKey) \ + ENUMIFY(longNegOneKey) \ + ENUMIFY(longOneKey) \ + ENUMIFY(longZeroKey) \ + ENUMIFY(randVal) \ + ENUMIFY(recordId) \ + ENUMIFY(searchHighlights) \ + ENUMIFY(searchScore) \ + ENUMIFY(sortKey) \ + ENUMIFY(textScore) \ + ENUMIFY(timeseriesBucketMaxTime) \ + ENUMIFY(timeseriesBucketMinTime) \ ENUMIFY(trueKey) QUERY_UTIL_NAMED_ENUM_DEFINE(KeyValue, KEYVALUES) |