[SERVER-30717] $or should detect if it has no children during serialization Created: 17/Aug/17  Updated: 30/Oct/23  Resolved: 12/Sep/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kyle Suarez Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-09-11, Query 2017-10-02
Participants:

 Description   

When $and is serialized, it detects if it has no children to avoid serializing to something that would fail to parse during reserialization.

$or does not have this check, but it should. Presumably it should serialize an $alwaysFalse match expression.



 Comments   
Comment by Ramon Fernandez Marina [ 12/Sep/17 ]

Author:

{'username': u'BlakeIsBlake', 'name': u'Blake Oler', 'email': u'blake.oler@10gen.com'}

Message:SERVER-30717 Serialize OrMatchExpression to {$alwaysFalse: 1}
Branch:master
https://github.com/mongodb/mongo/commit/33cb4a950c5de3c1c783b25ecf0fd4454cce844a

Generated at Thu Feb 08 04:24:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.