code: func (hg *Histogram) BetweenRowCount(a, b types.Datum) float64 {
  	lessCountA := hg.lessRowCount(a)
  	lessCountB := hg.lessRowCount(b)
  	// If lessCountA is not less than lessCountB, it may be that they fall to the same bucket and we cannot estimate
  	// the fraction, so we use `totalCount / NDV` to estimate the row count, but the result should not greater than
  	// lessCountB or notNullCount-lessCountA.
  	if lessCountA >= lessCountB && hg.NDV > 0 {
  		result := math.Min(lessCountB, hg.notNullCount()-lessCountA)
  		return math.Min(result, hg.notNullCount()/float64(hg.NDV))
  	}
  	return lessCountB - lessCountA
  }
docs: // BetweenRowCount estimates the row count where column greater or equal to a and less than b.