SERVER-126814ClosedFixed
$bucket on untracked viewless timeseries can optimize the pipeline on mongos before prepending $_internalUnpackBucket
For timeseries collections, timeseries rewrites (prepending $_internalUnpackBucket) must happen before any optimizations. On mongos we optimize the pipeline if one of the following are true: * routingTableIsAvailable * requiresCollationForParsingUnshardedAggregate * hasChangeStream * shouldDoFLERewrite If routingTableIsAvailable is true, then we can perform the timeseries rewrite on mongos and should optimize the pipeline correctly. If routingTableIsAvailable is false then we do