$bucket desugars itself into a $group stage by building a BSON $switch expression and re-parsing it. Boundary and default values are serialized as bare values, so a $literal containing a $-prefixed string (e.g. {$literal: "$color"} or {$literal: "$$ROOT"}) is re-parsed as a field-path / variable expression instead of remaining a constant.
Fix serialization of constant values in $bucket stage
ExportXML Word Printable JSON
- Assignee:
-
Jan Steemann
- Reporter:
-
Jan Steemann
- Votes:
-
0 Vote for this issue - Watchers:
-
4 Start watching this issue
- Created:
- Updated:
- Resolved: