[SERVER-26180] is this a bug in $cond in $project, or am i using it wrong? Created: 20/Sep/16 Updated: 27/Sep/16 Resolved: 20/Sep/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.2.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | tony kerz | Assignee: | Unassigned |
| 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: | see above... |
||||||||
| Participants: | |||||||||
| Description |
|
here's some data:
here's a pipeline, desired effect is to concat a and b if i have both fields, or just use a if b isn't present:
but when b is not present and i want a i get null... ?! |
| Comments |
| Comment by Asya Kamsky [ 27/Sep/16 ] | |||
|
Meanwhile a workaround would be to add explicit "ifNull" to convert missing "$b" into explicit "null":
| |||
| Comment by Kelsey Schubert [ 20/Sep/16 ] | |||
|
Hi tony-kerz, Thank you for reporting this behavior. We are tracking this bug in SERVER-13903. Please feel free to vote for it and watch it for updates. Kind regards, |