code: func ValueToString(value *types.Datum, idxCols int) (string, error) {
  	if idxCols == 0 {
  		return value.ToString()
  	}
  	decodedVals, err := codec.DecodeRange(value.GetBytes(), idxCols)
  	if err != nil {
  		return "", errors.Trace(err)
  	}
  	str, err := types.DatumsToString(decodedVals, true)
  	if err != nil {
  		return "", errors.Trace(err)
  	}
  	return str, nil
  }
docs: // ValueToString converts a possible encoded value to a formatted string. If the value is encoded, then
  // idxCols equals to number of origin values, else idxCols is 0.