[SERVER-28621] Parse BSON update expression into an UpdateNode tree Created: 04/Apr/17  Updated: 06/Dec/17  Resolved: 20/Apr/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.5.7

Type: Task Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-28758 Implement UpdateNode::mergeTrees() Closed
is depended on by SERVER-28759 Implement SetNode::apply() Closed
is depended on by SERVER-28764 Create AddToSetNode Closed
is depended on by SERVER-28765 Create BitNode Closed
is depended on by SERVER-28766 Create CurrentDateNode Closed
is depended on by SERVER-28767 Create IncNode/MulNode Closed
is depended on by SERVER-28768 Create MaxNode/MinNode Closed
is depended on by SERVER-28769 Create PopNode Closed
is depended on by SERVER-28770 Create PullNode Closed
is depended on by SERVER-28771 Create PullAllNode Closed
is depended on by SERVER-28772 Create PushNode/PushAllNode Closed
is depended on by SERVER-28773 Create SetOnInsertNode Closed
is depended on by SERVER-28774 Create RenameNode Closed
is depended on by SERVER-28776 Create an alternative to ModifierObje... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2017-04-17, Query 2017-05-08
Participants:

 Description   

Create the interface UpdateNode and subclasses UpdateObjectNode and UpdateLeafNode, and its subclass UpdateSetNode. Implement a function

Status UpdateObjectNode::parseAndMerge(modifiertable::ModifierType type, BSONElement modExpr, bool fromReplication, CollatorInterface* collator, bool* positional)

parseAndMerge() should parse modExpr as an update modifier and merge it with the UpdateObjectNode. This will be plugged into UpdateDriver::addAndParse().

Parsing should fail if:

  • type is not MOD_SET (for now).
  • The field path in modExpr is not updatable.
  • The field path in modExpr contains multiple positional ($) elements, e.g. {$set: {"a.$.$": 5}}.
  • A leaf node fails to parse the value, e.g. {$inc: {a: "bad"}}.
  • A conflict is detected, i.e. we try to create an UpdateObjectNode and an UpdateLeafNode in the same position in the try, or we try to create two UpdateLeafNodes in the same position in the tree.

Implement UpdateNode::setCollator().



 Comments   
Comment by Githook User [ 20/Apr/17 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-28621 Parse BSON update expression into an UpdateNode tree
Branch: master
https://github.com/mongodb/mongo/commit/0293c14cbdc5646d9f09f4fe5b2a27e6d540dce0

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