code: func GetPseudoRowCountByColumnRanges(sc *stmtctx.StatementContext, tableRowCount float64, columnRanges []*ranger.Range, colIdx int) (float64, error) {
  	var rowCount float64
  	var err error
  	for _, ran := range columnRanges {
  		if ran.LowVal[colIdx].Kind() == types.KindNull && ran.HighVal[colIdx].Kind() == types.KindMaxValue {
  			rowCount += tableRowCount
  		} else if ran.LowVal[colIdx].Kind() == types.KindMinNotNull {
  			nullCount := tableRowCount / pseudoEqualRate
  			if ran.HighVal[colIdx].Kind() == types.KindMaxValue {
  				rowCount += tableRowCount - nullCount
  			} else if err == nil {
  				lessCount := tableRowCount / pseudoLessRate
  				rowCount += lessCount - nullCount
  			}
  		} else if ran.HighVal[colIdx].Kind() == types.KindMaxValue {
  			rowCount += tableRowCount / pseudoLessRate
  		} else {
  			compare, err1 := ran.LowVal[colIdx].CompareDatum(sc, &ran.HighVal[colIdx])
  			if err1 != nil {
  				return 0, errors.Trace(err1)
  			}
  			if compare == 0 {
  				rowCount += tableRowCount / pseudoEqualRate
  			} else {
  				rowCount += tableRowCount / pseudoBetweenRate
  			}
  		}
  		if err != nil {
  			return 0, errors.Trace(err)
  		}
  	}
  	if rowCount > tableRowCount {
  		rowCount = tableRowCount
  	}
  	return rowCount, nil
  }
docs: // GetPseudoRowCountByColumnRanges calculate the row count by the ranges if there's no statistics information for this column.