code: func decodeCMSketch(data []byte, topN []*TopNMeta) (*CMSketch, error) {
  	if data == nil {
  		return nil, nil
  	}
  	p := &tipb.CMSketch{}
  	err := p.Unmarshal(data)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	if len(p.Rows) == 0 && len(topN) == 0 {
  		return nil, nil
  	}
  	for _, meta := range topN {
  		p.TopN = append(p.TopN, &tipb.CMSketchTopN{Data: meta.Data, Count: meta.Count})
  	}
  	return CMSketchFromProto(p), nil
  }
docs: // decodeCMSketch decode a CMSketch from the given byte slice.