File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
source/reference/operator/aggregation Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,22 @@ Definition
3333 first argument. For more information on expressions, see
3434 :ref:`aggregation-expressions`.
3535
36+ Behavior
37+ --------
38+
39+ Starting in MongoDB 4.4.3, the result will have the same type as the
40+ input except when it cannot be represented accurately in that type. In
41+ these cases:
42+
43+ - A 32-bit integer will be converted to a 64-bit integer if the
44+ result is representable as a 64-bit integer.
45+
46+ - A 32-bit integer will be converted to a double if the result is
47+ not representable as a 64-bit integer.
48+
49+ - A 64-bit integer will be converted to double if the result is not
50+ representable as a 64-bit integer.
51+
3652Examples
3753--------
3854
Original file line number Diff line number Diff line change @@ -52,6 +52,21 @@ Definition
5252Behavior
5353--------
5454
55+ Result Data Type
56+ ~~~~~~~~~~~~~~~~
57+
58+ The result will have the same type as the input except when it cannot be
59+ represented accurately in that type. In these cases:
60+
61+ - A 32-bit integer will be converted to a 64-bit integer if the
62+ result is representable as a 64-bit integer.
63+
64+ - A 32-bit integer will be converted to a double if the result is
65+ not representable as a 64-bit integer.
66+
67+ - A 64-bit integer will be converted to double if the result is not
68+ representable as a 64-bit integer.
69+
5570Non-Numeric or Non-Existent Fields
5671~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5772
You can’t perform that action at this time.
0 commit comments