I noticed this while reviewing the pull request for SERVER-74371 "Support arbitrary expressions for 'field' parameter for $getField" - a test case there shows the following:
Current Behavior
will become one of the following, depending on the serialization options:
Representative Shape
{$convert: {
|
input: "$foo",
|
to: "?"
|
}}
|
Debug Shape
{$convert: {
|
input: "$foo",
|
to: "?string"
|
}}
|
Proposed New Behavior
I would propose we do the following instead:
Representative Shape
{$convert: {
|
input: "$foo",
|
to: "string"
|
}}
|
Debug Shape
{$convert: {
|
input: "$foo",
|
to: "string"
|
}}
|