code: func getColumnRangeCounts(sc *stmtctx.StatementContext, colID int64, ranges []*ranger.Range, histColl *statistics.Table, idxID int64) ([]float64, bool) {
  	var err error
  	var count float64
  	rangeCounts := make([]float64, len(ranges))
  	for i, ran := range ranges {
  		if idxID >= 0 {
  			idxHist := histColl.Indices[idxID]
  			if idxHist == nil || idxHist.IsInvalid(false) {
  				return nil, false
  			}
  			count, err = histColl.GetRowCountByIndexRanges(sc, idxID, []*ranger.Range{ran})
  		} else {
  			colHist, ok := histColl.Columns[colID]
  			if !ok || colHist.IsInvalid(sc, false) {
  				return nil, false
  			}
  			count, err = histColl.GetRowCountByColumnRanges(sc, colID, []*ranger.Range{ran})
  		}
  		if err != nil {
  			return nil, false
  		}
  		rangeCounts[i] = count
  	}
  	return rangeCounts, true
  }
docs: // getColumnRangeCounts estimates row count for each range respectively.