[skip ci] Add comment for storage.StatsWriter (#12965)

Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
pull/12975/head
shaoyue 2021-12-08 15:13:32 +08:00 committed by GitHub
parent 34fadc9ab6
commit 5045ba208e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -34,14 +34,17 @@ type Int64Stats struct {
BF *bloom.BloomFilter `json:"bf"`
}
// StatsWriter writes stats to buffer
type StatsWriter struct {
buffer []byte
}
// GetBuffer returns buffer
func (sw *StatsWriter) GetBuffer() []byte {
return sw.buffer
}
// StatsInt64 writes Int64Stats from @msgs with @fieldID to @buffer
func (sw *StatsWriter) StatsInt64(fieldID int64, isPrimaryKey bool, msgs []int64) error {
if len(msgs) < 1 {
// return error: msgs must has one element at least