[SERVER-84849] POC: New positional path syntax in agg: "a.$[0]" Created: 07/Mar/19  Updated: 12/Jan/24  Resolved: 20/Mar/19

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

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Justin Seyster
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Query 2019-03-25
Participants:

 Description   

At a first guess, there are three main pieces to this work:

  1. Adding logic to the FieldPath class to notice and accept something like "$[0]".
  2. Adding logic to the Document and Value classes to interpret this correctly in methods like 'getDottedPath'
  3. Adding logic to the $project and $addFields stages to support something like {$addFields: {"a.$[0]": 1}} - $project might be slightly weirder with its semantics of how anything not referenced is not included.


 Comments   
Comment by Charlie Swanson [ 20/Mar/19 ]

Decided against this in scoping/syntax discussions. Closing.

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