[SERVER-75060] $internalConstructStats should accept value to be processed directly instead of hardcoding to "$val" Created: 20/Mar/23  Updated: 21/Mar/23

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

Type: Improvement Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Participants:

 Description   

The $internalConstructStats accumulator currently accepts the full root document and expects a hardcoded field "val" to contain the actual data to accumulate. It would be better (and more inline with other accumulators) to have the desugaring phase handle this and pass the value directly to the accumulator, so something like this:

 $_internalConstructStats: {
    val: "$val",
    sampleRate: sampleRate
}


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