Reference documentation and code samples for the Google Cloud Datastore v1 API class AggregationQuery.Types.Aggregation.Types.Sum.
Sum of the values of the requested property.
Only numeric values will be aggregated. All non-numeric values
including NULL are skipped.
If the aggregated values contain NaN, returns NaN. Infinity math
follows IEEE-754 standards.
If the aggregated value set is empty, returns 0.
Returns a 64-bit integer if all aggregated numbers are integers and the
sum result does not overflow. Otherwise, the result is returned as a
double. Note that even if all the aggregated values are integers, the
result is returned as a double if it cannot fit within a 64-bit signed
integer. When this occurs, the returned value will lose precision.
When underflow occurs, floating-point aggregation is non-deterministic.
This means that running the same query repeatedly without any changes to
the underlying values could produce slightly different results each
time. In those cases, values should be stored as integers over
floating-point numbers.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation page covers the \u003ccode\u003eAggregationQuery.Types.Aggregation.Types.Sum\u003c/code\u003e class within the Google Cloud Datastore v1 API for .NET, detailing its functionality and usage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSum\u003c/code\u003e class calculates the sum of numeric values from a specified property, skipping non-numeric values and returning \u003ccode\u003eNaN\u003c/code\u003e if any values are \u003ccode\u003eNaN\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf the set of values to be added is empty, the \u003ccode\u003eSum\u003c/code\u003e class returns 0; if all values are integers and the result doesn't overflow, a 64-bit integer is returned; otherwise, a double is returned, which may lose precision in some cases.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSum\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and it has constructors for creating new instances, including one that copies from an existing \u003ccode\u003eSum\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eThe class can be found in the \u003ccode\u003eGoogle.Cloud.Datastore.V1\u003c/code\u003e namespace, within the \u003ccode\u003eGoogle.Cloud.Datastore.V1.dll\u003c/code\u003e assembly, with the documentation providing detailed information about property value types and descriptions.\u003c/p\u003e\n"]]],[],null,[]]