Skip to content

Commit b6337d9

Browse files
authored
Merge pull request #281 from tigergraph/DOC-2408-aggreg-func-empty-nuance
Doc 2408 aggreg func empty nuance
2 parents 9628343 + 7c09030 commit b6337d9

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

modules/querying/pages/func/aggregation-functions.adoc

+17-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@ count([1, 1, 2, 2) => 4
101101

102102
Returns the member with the maximum value in a set or bag.
103103
The function can only take set/bag expressions whose members are numeric types.
104-
Returns 0 if the input set is empty.
104+
105+
[NOTE]
106+
====
107+
If the input set is empty:
108+
109+
* If the function is used to aggregate the vertex or edge attributes selected by a SELECT or MERGE clause, then the return value is the minimum possible value for that data type (similar to MaxAccum behavior).
110+
* Otherwise, the return value is 0.
111+
====
105112

106113
[discrete]
107114
=== Return type
@@ -138,7 +145,15 @@ max([1, 1, 3, 3]) => 3
138145
=== Description
139146

140147
Returns the member with the minimum value in a set or bag. The function can only take set/bag expressions whose members are numeric types.
141-
Returns 0 if the input set is empty.
148+
149+
[NOTE]
150+
====
151+
If the input set is empty:
152+
153+
* If the function is used to aggregate the vertex or edge attributes selected by a SELECT or MERGE clause, then the return value is the maximum possible value for that data type (similar to MinAccum behavior).
154+
* Otherwise, the return value is 0.
155+
====
156+
142157

143158
[discrete]
144159
=== Return type

0 commit comments

Comments
 (0)