code: func getBucketScore(bkts []bucket, totalCount float64, id int) bucketScore {
  	preCount, count := float64(bkts[id-1].Count), float64(bkts[id].Count)
  	// do not merge if the result bucket is too large
  	if (preCount + count) > maxBucketFraction*totalCount {
  		return bucketScore{id, math.MaxFloat64}
  	}
  	// Merge them if the result bucket is already too small.
  	if (preCount + count) < minBucketFraction*totalCount {
  		return bucketScore{id, 0}
  	}
  	low, mid, high := bkts[id-1].Lower, bkts[id-1].Upper, bkts[id].Upper
  	// If we choose to merge, err is the absolute estimate error for the previous bucket.
  	err := calcFraction4Datums(low, high, mid)*(preCount+count) - preCount
  	return bucketScore{id, math.Abs(err / (preCount + count))}
  }
docs: // getBucketScore gets the score for merge this bucket with previous one.
  // TODO: We also need to consider the bucket hit count.