code: func (hg *Histogram) LessRowCountWithBktIdx(value types.Datum) (float64, int) {
  	// All the values are null.
  	if hg.Bounds.NumRows() == 0 {
  		return 0, 0
  	}
  	index, match := hg.Bounds.LowerBound(0, &value)
  	if index == hg.Bounds.NumRows() {
  		return hg.notNullCount(), hg.Len() - 1
  	}
  	// Since we store the lower and upper bound together, so dividing the index by 2 will get the bucket index.
  	bucketIdx := index / 2
  	curCount, curRepeat := float64(hg.Buckets[bucketIdx].Count), float64(hg.Buckets[bucketIdx].Repeat)
  	preCount := float64(0)
  	if bucketIdx > 0 {
  		preCount = float64(hg.Buckets[bucketIdx-1].Count)
  	}
  	if index%2 == 1 {
  		if match {
  			return curCount - curRepeat, bucketIdx
  		}
  		return preCount + hg.calcFraction(bucketIdx, &value)*(curCount-curRepeat-preCount), bucketIdx
  	}
  	return preCount, bucketIdx
  }
docs: // LessRowCountWithBktIdx estimates the row count where the column less than value.