code: func getOverlapFraction(fb Feedback, bkt bucket) (float64, float64) {
  	datums := make([]types.Datum, 0, 4)
  	datums = append(datums, *fb.Lower, *fb.Upper)
  	datums = append(datums, *bkt.Lower, *bkt.Upper)
  	err := types.SortDatums(nil, datums)
  	if err != nil {
  		return 0, 0
  	}
  	minValue, maxValue := &datums[0], &datums[3]
  	fbLower := calcFraction4Datums(minValue, maxValue, fb.Lower)
  	fbUpper := calcFraction4Datums(minValue, maxValue, fb.Upper)
  	bktLower := calcFraction4Datums(minValue, maxValue, bkt.Lower)
  	bktUpper := calcFraction4Datums(minValue, maxValue, bkt.Upper)
  	ratio := (bktUpper - bktLower) / (fbUpper - fbLower)
  	// full overlap
  	if fbLower <= bktLower && bktUpper <= fbUpper {
  		return bktUpper - bktLower, ratio
  	}
  	if bktLower <= fbLower && fbUpper <= bktUpper {
  		return fbUpper - fbLower, ratio
  	}
  	// partial overlap
  	overlap := math.Min(bktUpper-fbLower, fbUpper-bktLower)
  	return overlap, ratio
  }
docs: // getOverlapFraction gets the overlap fraction of feedback and bucket range. In order to get the bucket count, it also
  // returns the ratio between bucket fraction and feedback fraction.