code: func buildColumnRange(accessConditions []expression.Expression, sc *stmtctx.StatementContext, tp *types.FieldType, tableRange bool, colLen int) (ranges []*Range, err error) {
  	rb := builder{sc: sc}
  	rangePoints := fullRange
  	for _, cond := range accessConditions {
  		rangePoints = rb.intersection(rangePoints, rb.build(cond))
  		if rb.err != nil {
  			return nil, errors.Trace(rb.err)
  		}
  	}
  	newTp := newFieldType(tp)
  	if tableRange {
  		ranges, err = points2TableRanges(sc, rangePoints, newTp)
  	} else {
  		ranges, err = points2Ranges(sc, rangePoints, newTp)
  	}
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	if colLen != types.UnspecifiedLength {
  		for _, ran := range ranges {
  			if fixRangeDatum(&ran.LowVal[0], colLen, tp) {
  				ran.LowExclude = false
  			}
  			if fixRangeDatum(&ran.HighVal[0], colLen, tp) {
  				ran.HighExclude = false
  			}
  		}
  	}
  	return ranges, nil
  }
docs: // buildColumnRange builds range from CNF conditions.