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
33
33
first argument. For more information on expressions, see
34
34
:ref:`aggregation-expressions`.
35
35
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
+
36
52
Examples
37
53
--------
38
54
Original file line number Diff line number Diff line change @@ -52,6 +52,21 @@ Definition
52
52
Behavior
53
53
--------
54
54
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
+
55
70
Non-Numeric or Non-Existent Fields
56
71
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57
72
You can’t perform that action at this time.
0 commit comments