[SERVER-67550] [CQF] Equality to null does not match undefined Created: 27/Jun/22  Updated: 22/Sep/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: bonsai-semantic-difference
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-81378 Change classic behavior: equality to ... In Code Review
Related
Assigned Teams:
Query Optimization
Operating System: ALL
Participants:

 Description   

This is specific to bonsai, the classic optimizer does not have this issue. Equality to null correctly matches null and missing, however it misses values which are explicitly undefined. Simplest repro:

db.test.insert({_id: "a_undefined", a: undefined});
assert.eq(db.test.find({a: null}).toArray(), [{_id: "a_undefined", a: undefined}]);



 Comments   
Comment by Hana Pearlman [ 22/Sep/23 ]

As part of the most recent semantic differences conversation, we decided to try to change classic behavior to match Bonsai for v8.0. SERVER-81378 will change the classic behavior so that comparisons to null do not match undefined. I'm going to leave this ticket open for now, since there are some TODOs associated with it. But, after SERVER-81378 is complete, we should be able to close this as works-as-designed.

Comment by Nicholas Zolnierz [ 26/Jul/22 ]

ruslan.abdulkhalikov@mongodb.com let's keep it open but park it on the backlog, these tickets will be useful to track diverging semantics.

Comment by Ruslan Abdulkhalikov (Inactive) [ 26/Jul/22 ]

As discussed with ABT team we are going to park this ticket till the "undefined" semantics is well established

Generated at Thu Feb 08 06:08:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.