[SERVER-25231] Create base class for Expressions with named arguments Created: 22/Jul/16  Updated: 06/Dec/22  Resolved: 18/Mar/21

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

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Backlog - Query Optimization
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Participants:

 Description   

We have the base class ExpressionNary which nicely abstracts away a lot of the parsing and other mechanical parts of the Expression interface for expressions of the form {$expressionName: [array, of, arguments]}. We should have a similar base class for expressions of the form {$expressionName: {arg1: val1, arg2: val2}.

This will also help prevent a class of bugs where an expression forgets to implement serialize, or forgets to optimize it's arguments, etc.



 Comments   
Comment by Jacob Evans [ 18/Mar/21 ]

A base class modification was introduced for these classes already with SERVER-40526 which makes accessing named members much easier. The specific concern to do with unifying parsing is no longer especially relevant as we move to put parsing functionality outside the class hierarchy into its own framework.

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