diff options
Diffstat (limited to 'src/mongo/db/query/optimizer/utils/utils.cpp')
-rw-r--r-- | src/mongo/db/query/optimizer/utils/utils.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/query/optimizer/utils/utils.cpp b/src/mongo/db/query/optimizer/utils/utils.cpp index 6c2dac94c96..a676e28179b 100644 --- a/src/mongo/db/query/optimizer/utils/utils.cpp +++ b/src/mongo/db/query/optimizer/utils/utils.cpp @@ -102,6 +102,7 @@ properties::LogicalProps createInitialScanProps(const ProjectionName& projection projectionName, scanDefName, true /*eqPredsOnly*/, + false /*hasProperInterval*/, {} /*satisfiedPartialIndexes*/), properties::CollectionAvailability({scanDefName}), properties::DistributionAvailability(std::move(distributions))); @@ -1928,4 +1929,14 @@ bool pathEndsInTraverse(const optimizer::ABT& path) { return optimizer::algebra::transport<false>(path, t); } +bool hasProperIntervals(const PartialSchemaRequirements& reqMap) { + // Compute if this node has any proper (not fully open) intervals. + for (const auto& [key, req] : reqMap) { + if (!isIntervalReqFullyOpenDNF(req.getIntervals())) { + return true; + } + } + return false; +} + } // namespace mongo::optimizer |