code: func (f *Field) Sum(filter *Row, name string) (sum, count int64, err error) {
  	bsig := f.bsiGroup(name)
  	if bsig == nil {
  		return 0, 0, ErrBSIGroupNotFound
  	}
  
  	view := f.view(viewBSIGroupPrefix + name)
  	if view == nil {
  		return 0, 0, nil
  	}
  
  	vsum, vcount, err := view.sum(filter, bsig.BitDepth())
  	if err != nil {
  		return 0, 0, err
  	}
  	return int64(vsum) + (int64(vcount) * bsig.Min), int64(vcount), nil
  }
docs: // Sum returns the sum and count for a field.
  // An optional filtering row can be provided.