code: func (hg *Histogram) ConvertTo(sc *stmtctx.StatementContext, tp *types.FieldType) (*Histogram, error) {
  	hist := NewHistogram(hg.ID, hg.NDV, hg.NullCount, hg.LastUpdateVersion, tp, hg.Len(), hg.TotColSize)
  	iter := chunk.NewIterator4Chunk(hg.Bounds)
  	for row := iter.Begin(); row != iter.End(); row = iter.Next() {
  		d := row.GetDatum(0, hg.Tp)
  		d, err := d.ConvertTo(sc, tp)
  		if err != nil {
  			return nil, errors.Trace(err)
  		}
  		hist.Bounds.AppendDatum(0, &d)
  	}
  	hist.Buckets = hg.Buckets
  	return hist, nil
  }
docs: // ConvertTo converts the histogram bucket values into `Tp`.