Class StructuredAggregationQuery.Aggregation.Sum.Builder (3.36.0)
Version 3.36.0keyboard_arrow_down
public static final class StructuredAggregationQuery . Aggregation . Sum . Builder extends GeneratedMessage . Builder<StructuredAggregationQuery . Aggregation . Sum . Builder > implements StructuredAggregationQuery . Aggregation . SumOrBuilder
Sum of the values of the requested field.
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.
Protobuf type google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum
Inherited Members
com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
build()
public StructuredAggregationQuery . Aggregation . Sum build ()
buildPartial()
public StructuredAggregationQuery . Aggregation . Sum buildPartial ()
clear()
public StructuredAggregationQuery . Aggregation . Sum . Builder clear ()
Overrides
clearField()
public StructuredAggregationQuery . Aggregation . Sum . Builder clearField ()
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
getDefaultInstanceForType()
public StructuredAggregationQuery . Aggregation . Sum getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getField()
public StructuredQuery . FieldReference getField ()
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
getFieldBuilder()
public StructuredQuery . FieldReference . Builder getFieldBuilder ()
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
getFieldOrBuilder()
public StructuredQuery . FieldReferenceOrBuilder getFieldOrBuilder ()
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
hasField()
public boolean hasField ()
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
Returns
Type
Description
boolean
Whether the field field is set.
internalGetFieldAccessorTable()
protected GeneratedMessage . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeField(StructuredQuery.FieldReference value)
public StructuredAggregationQuery . Aggregation . Sum . Builder mergeField ( StructuredQuery . FieldReference value )
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
mergeFrom(StructuredAggregationQuery.Aggregation.Sum other)
public StructuredAggregationQuery . Aggregation . Sum . Builder mergeFrom ( StructuredAggregationQuery . Aggregation . Sum other )
public StructuredAggregationQuery . Aggregation . Sum . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public StructuredAggregationQuery . Aggregation . Sum . Builder mergeFrom ( Message other )
Parameter
Name
Description
other
Message
Overrides
setField(StructuredQuery.FieldReference value)
public StructuredAggregationQuery . Aggregation . Sum . Builder setField ( StructuredQuery . FieldReference value )
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
setField(StructuredQuery.FieldReference.Builder builderForValue)
public StructuredAggregationQuery . Aggregation . Sum . Builder setField ( StructuredQuery . FieldReference . Builder builderForValue )
The field to aggregate on.
.google.firestore.v1.StructuredQuery.FieldReference field = 1;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-27 UTC.
[[["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 2026-02-27 UTC."],[],[]]