code: func HistogramFromProto(protoHg *tipb.Histogram) *Histogram {
  	tp := types.NewFieldType(mysql.TypeBlob)
  	hg := NewHistogram(0, protoHg.Ndv, 0, 0, tp, len(protoHg.Buckets), 0)
  	for _, bucket := range protoHg.Buckets {
  		lower, upper := types.NewBytesDatum(bucket.LowerBound), types.NewBytesDatum(bucket.UpperBound)
  		hg.AppendBucket(&lower, &upper, bucket.Count, bucket.Repeats)
  	}
  	return hg
  }
docs: // HistogramFromProto converts Histogram from its protobuf representation.
  // Note that we will set BytesDatum for the lower/upper bound in the bucket, the decode will
  // be after all histograms merged.