/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Type annotations for serialized aggregators.
//
// They can be used to indicate when a field contains a serialized aggregator
// so that it can be recognized by analysis tools and data warehouses.
//
// Example:
//
// import "annotation.proto";
//
// message Metrics {
//
// // A serialized HyperLogLog++ aggregator over strings.
// optional bytes unique_users_hll = [(zetasketch.aggregator) = {
// type: HYPERLOGLOG_PLUS_UNIQUE
// value_type: BYTES_OR_UTF8_STRING
// }];
//
// ...
// }
syntax = "proto2";
package zetasketch;
import "google/protobuf/descriptor.proto";
import "aggregator.proto";
option java_package = "com.google.protos.zetasketch";
extend google.protobuf.FieldOptions {
// Indicates that a field contains a serialized aggregator state. See above
// for an example on how this can be used.
optional AggregatorSchema aggregator = 144331015;
}
message AggregatorSchema {
// The type of the aggregator.
optional AggregatorType type = 1;
// Specifies the value type for the aggregation, if DefaultOps<Value> (or a
// compatible ops implementation) was used.
optional DefaultOpsType.Id value_type = 2;
}