[SERVER-60203] Translation of the groupBy expression of a sugared $group is unimplemented Created: 24/Sep/21 Updated: 27/Sep/21 Resolved: 27/Sep/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Cox (Inactive) | Assignee: | Yoon Soo Kim |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Steps To Reproduce: | A minimal repro for $bucket:
Notice that $bucket without an $and for the groupBy does not produce the error and group can be pushed down and executes correctly,
A minimal repro for $sortByCount:
|
||||||||||||||||||||||||
| Sprint: | QE 2021-10-04 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The aggregation wildcard fuzzer has exposed a MONGO_UNREACHABLE bug when translating $bucket, $bucketAuto, $sortByGroup's groupBy expression. The failures for $bucket was a result of these pipelines: The failures for $bucketAuto are a result of these pipelines: The failures for a $sortByCount: |
| Comments |
| Comment by Yoon Soo Kim [ 27/Sep/21 ] | ||||||||||||||||
|
eric.cox, Agreed and closed as a dup of | ||||||||||||||||
| Comment by Eric Cox (Inactive) [ 27/Sep/21 ] | ||||||||||||||||
|
yoonsoo.kim I believe this ticket can be closed because we fixed this in https://github.com/10gen/mongo/pull/898. I opened up | ||||||||||||||||
| Comment by Eric Cox (Inactive) [ 24/Sep/21 ] | ||||||||||||||||
|
For $bucket and $sortByCount if the groupBy expression is an $and, $or, or $not of $and $or the groupBy expression is translated to $coerceToBool in the classic engine,
Running an example in the classic engine this works because the classic engine evaluates $coerceToBool
This causes the translation flow to go down an unimplemented path when translating ExpressionCoerceToBool in the SBE expression stage builder. I saw some work was done in |