code: func (coll *HistColl) GetRowCountByIndexRanges(sc *stmtctx.StatementContext, idxID int64, indexRanges []*ranger.Range) (float64, error) {
  	idx := coll.Indices[idxID]
  	if idx == nil || idx.IsInvalid(coll.Pseudo) {
  		colsLen := -1
  		if idx != nil && idx.Info.Unique {
  			colsLen = len(idx.Info.Columns)
  		}
  		return getPseudoRowCountByIndexRanges(sc, indexRanges, float64(coll.Count), colsLen)
  	}
  	var result float64
  	var err error
  	if idx.CMSketch != nil && idx.StatsVer == Version1 {
  		result, err = coll.getIndexRowCount(sc, idxID, indexRanges)
  	} else {
  		result, err = idx.GetRowCount(sc, indexRanges, coll.ModifyCount)
  	}
  	result *= idx.GetIncreaseFactor(coll.Count)
  	return result, errors.Trace(err)
  }
docs: // GetRowCountByIndexRanges estimates the row count by a slice of Range.