code: func (q *QueryFeedback) DecodeToRanges(isIndex bool) ([]*ranger.Range, error) {
  	ranges := make([]*ranger.Range, 0, len(q.Feedback))
  	for _, val := range q.Feedback {
  		low, high := *val.Lower, *val.Upper
  		var lowVal, highVal []types.Datum
  		if isIndex {
  			var err error
  			// As we do not know the origin length, just use a custom value here.
  			lowVal, err = codec.DecodeRange(low.GetBytes(), 4)
  			if err != nil {
  				return nil, errors.Trace(err)
  			}
  			highVal, err = codec.DecodeRange(high.GetBytes(), 4)
  			if err != nil {
  				return nil, errors.Trace(err)
  			}
  		} else {
  			_, lowInt, err := codec.DecodeInt(val.Lower.GetBytes())
  			if err != nil {
  				return nil, errors.Trace(err)
  			}
  			_, highInt, err := codec.DecodeInt(val.Upper.GetBytes())
  			if err != nil {
  				return nil, errors.Trace(err)
  			}
  			lowVal = []types.Datum{types.NewIntDatum(lowInt)}
  			highVal = []types.Datum{types.NewIntDatum(highInt)}
  		}
  		ranges = append(ranges, &(ranger.Range{
  			LowVal:      lowVal,
  			HighVal:     highVal,
  			HighExclude: true,
  		}))
  	}
  	return ranges, nil
  }
docs: // DecodeToRanges decode the feedback to ranges.