mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-57005 Fix unpackbucket rewrite after optimizeEndOfPipeline
This commit is contained in:
parent
fcdc972cd6
commit
0e4ff78d3c
@ -904,6 +904,10 @@ Pipeline::SourceContainer::iterator DocumentSourceInternalUnpackBucket::doOptimi
|
||||
if (!_optimizedEndOfPipeline) {
|
||||
_optimizedEndOfPipeline = true;
|
||||
optimizeEndOfPipeline(itr, container);
|
||||
|
||||
if (std::next(itr) == container->end()) {
|
||||
return container->end();
|
||||
}
|
||||
}
|
||||
{
|
||||
// Check if we can avoid unpacking if we have a group stage with min/max aggregates.
|
||||
|
Loading…
Reference in New Issue
Block a user