[SERVER-29406] syntactic sugars for aggregations Created: 31/May/17 Updated: 06/Dec/22 Resolved: 12/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Trivial - P5 |
| Reporter: | F?rat KÜÇÜK | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
IMHO writing aggregation for simple join operations are big efforts and some syntax improvements will be good. I know JSON has limitations and lots of stuff that I don't know about server core. But let me express my ideas: For instance basic calculations and string concats:
for just concatanation:
or sum operations:
and for join operations: this is a sample User collection:
Server can convert my query to an aggregation query but as a simple user It's a big effort. |
| Comments |
| Comment by Asya Kamsky [ 12/Jun/17 ] |
|
The server does not seem to be the right place to solve the syntax problem. All aggregations sent to the server must still be in proper syntax, even when they are short for a more complex pipeline (example "$count" stage which is syntactic sugar for $group stage that just wants count). It's been the purview of drivers and frameworks built on top of drivers to provide different syntax than what the server expects. |
| Comment by Asya Kamsky [ 09/Jun/17 ] |
|
Is syntactic sugar better handled by drivers? Drivers already provide syntax that's "nicer" for end-user and translate it to appropriate server commands ... |
| Comment by F?rat KÜÇÜK [ 31/May/17 ] |
|
Sorry for the typo in the title. I cannot edit my own issue. |