When processing the inputs from the child in HashAggStage, it's possible that equivalent per the collation but not identical keys would come in separated by another key (like "A" and "a" in the repro are separated by "B"). As a result, the recordStore with spilled records might not have "a" and "A" next to each other, but HashAggStage::getNextSpilled() assumes they are...
This bug causes SERVER-80374 and BF-30120 due to how tests in timeseries_lastpoint_top.js checks the results against a non-timeseries collection.
- duplicates
-
SERVER-81390 HashAggStage fails to respect the collation when spilling to disk
- Closed