code: func NewRegionFrameRange(region *tikv.KeyLocation) (idxRange *RegionFrameRange, err error) {
  	var first, last *FrameItem
  	// check and init first frame
  	if len(region.StartKey) > 0 {
  		first, err = NewFrameItemFromRegionKey(region.StartKey)
  		if err != nil {
  			return
  		}
  	} else { // empty startKey means start with -infinite
  		first = &FrameItem{
  			IndexID:  int64(math.MinInt64),
  			IsRecord: false,
  			TableID:  int64(math.MinInt64),
  		}
  	}
  
  	// check and init last frame
  	if len(region.EndKey) > 0 {
  		last, err = NewFrameItemFromRegionKey(region.EndKey)
  		if err != nil {
  			return
  		}
  	} else { // empty endKey means end with +infinite
  		last = &FrameItem{
  			TableID:  int64(math.MaxInt64),
  			IndexID:  int64(math.MaxInt64),
  			IsRecord: true,
  		}
  	}
  
  	idxRange = &RegionFrameRange{
  		region: region,
  		First:  first,
  		Last:   last,
  	}
  	return idxRange, nil
  }
docs: // NewRegionFrameRange init a NewRegionFrameRange with region info.