SERVER-139315Needs Scheduling

Record types of computed fields

We currently do not type computed fields like: {$set: \{a: {$add: [...]}} {$set: \{a: {$toLower: "$b"}} etc. Suggested solution The general practice in the dependency graph has been to compute the metadata of fields when we process the stage declaring the field, and to do additional type narrowing, using applicable $match stages, between the declaration site and the call site. I think we can continue that pattern. We already process per-expression dependencies at [processExpressio

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.