[SERVER-58680] $ifNull behaves differently in latest Created: 19/Jul/21 Updated: 29/Oct/23 Resolved: 22/Sep/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Ethan Zhang (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||
| Steps To Reproduce: | Behavior in 5.0.0 and earlier:
Unexpected behavior in latest:
|
||||||||||||||||||||||
| Sprint: | QE 2021-08-23, QE 2021-09-06, QE 2021-09-20, QE 2021-10-04 | ||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||
| Linked BF Score: | 153 | ||||||||||||||||||||||
| Description |
|
$ifNull behaves differently in latest when the replacement value is null. In earlier versions it returned null. In latest it omits the field entirely. While it may sound silly to use a replacement value of null, the LINQ provider in the C# driver uses this construct to replace a missing field with an explicit null-valued field. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] | |||||||||||||||||||||||||||||
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! | |||||||||||||||||||||||||||||
| Comment by Ethan Zhang (Inactive) [ 23/Sep/21 ] | |||||||||||||||||||||||||||||
|
Hi dmitry.lukyanov, this is what I got from the latest master:
Can you let me know what case do you see still failing on the latest master? | |||||||||||||||||||||||||||||
| Comment by Dmitry Lukyanov (Inactive) [ 23/Sep/21 ] | |||||||||||||||||||||||||||||
|
It looks like it's fixed on 5.0 and still failing on 5.1 | |||||||||||||||||||||||||||||
| Comment by Githook User [ 22/Sep/21 ] | |||||||||||||||||||||||||||||
|
Author: {'name': 'Ethan Zhang', 'email': 'ethan.zhang@mongodb.com', 'username': 'yzhang1991'}Message: | |||||||||||||||||||||||||||||
| Comment by Ethan Zhang (Inactive) [ 04/Sep/21 ] | |||||||||||||||||||||||||||||
|
Marking this 5.1 required because this is an unexpected behavioral change in mognod. | |||||||||||||||||||||||||||||
| Comment by Ethan Zhang (Inactive) [ 04/Sep/21 ] | |||||||||||||||||||||||||||||
|
On 5.0, the winning plan is:
On latest master, the winning plan is:
For some reason, the $ifNull expression is dropped on the latest master. Still investigating. | |||||||||||||||||||||||||||||
| Comment by James Kovacs [ 20/Jul/21 ] | |||||||||||||||||||||||||||||
|
Note that this behaviour only manifests if the replacement value is null. If the replacement value is non-null, latest works the same as previous versions.
|