Example #1
0
func (b *float64Accumulator) Accumulate(d encoding.Decoder, nullmask []bool, count uint) error {

	buff := make([]float64, count)
	read, err := d.DecodeFloat64(buff)
	if err != nil {
		return fmt.Errorf("%s.DecodeFloat64:%s", d, err)
	}

	if read != count {
		return fmt.Errorf("could not read all the expected values (%d) only %d", count, read)
	}

	b.buff = append(b.buff, buff...)
	b.nullmask = append(b.nullmask, nullmask...)

	return nil
}