summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/cqf/cqf_aggregate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/cqf/cqf_aggregate.cpp')
-rw-r--r--src/mongo/db/commands/cqf/cqf_aggregate.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/commands/cqf/cqf_aggregate.cpp b/src/mongo/db/commands/cqf/cqf_aggregate.cpp
index 26f6bcf5cff..516a3f9ca2e 100644
--- a/src/mongo/db/commands/cqf/cqf_aggregate.cpp
+++ b/src/mongo/db/commands/cqf/cqf_aggregate.cpp
@@ -184,12 +184,16 @@ static opt::unordered_map<std::string, optimizer::IndexDefinition> buildIndexSpe
// TODO: simplify expression.
- PartialSchemaReqConversion conversion = convertExprToPartialSchemaReq(exprABT);
- if (!conversion._success || conversion._hasEmptyInterval) {
+ auto conversion = convertExprToPartialSchemaReq(exprABT, true /*isFilterContext*/);
+ if (!conversion || conversion->_hasEmptyInterval) {
// Unsatisfiable partial index filter?
continue;
}
- partialIndexReqMap = std::move(conversion._reqMap);
+ tassert(6624257,
+ "Should not be seeing a partial index filter where we need to over-approximate",
+ !conversion->_retainPredicate);
+
+ partialIndexReqMap = std::move(conversion->_reqMap);
}
// For now we assume distribution is Centralized.