All Products
Search
Document Center

Tablestore:AvgAggregation

Last Updated:May 10, 2024

Specifies the aggregation operation of the search index feature that is used to obtain the average value of a field. This operation is similar to the AVG function in SQL.

Request syntax

message AvgAggregation {
    optional string field_name = 1;
    optional bytes missing = 2; //encoded as SQLVariant, check in SearchProxy
}

Parameter

Type

Required

Description

field_name

string

Yes

The name of the field on which you want to perform the aggregation operation.

missing

bytes

No

The default value of a field if the value of the field is empty in the row. The value of the parameter is encoded in PlainBuffer. For more information, see PlainBuffer.

  • If you do not specify a value for the missing parameter, the row is ignored.

  • If you specify a value for the missing parameter, the value of this parameter is used as the field value of the row.

Response syntax

message AvgAggregationResult {
    optional double value = 1;
}

Parameter

Type

Required

Description

value

double

Yes

The return value.