Documentation ¶
Index ¶
- Constants
- Variables
- func BuildIndexRange(sc *variable.StatementContext, tblInfo *model.TableInfo, ...) ([]*types.IndexRange, error)
- func BuildRange(sc *variable.StatementContext, conds []expression.Expression, rangeType int, ...) (retRanges []types.Range, ...)
- func BuildTableRange(accessConditions []expression.Expression, sc *variable.StatementContext) ([]types.IntColumnRange, error)
- func DetachColumnConditions(conditions []expression.Expression, colName model.CIStr) ([]expression.Expression, []expression.Expression)
- func DetachIndexFilterConditions(conditions []expression.Expression, indexColumns []*model.IndexColumn, ...) ([]expression.Expression, []expression.Expression)
- func DetachIndexScanConditions(conditions []expression.Expression, index *model.IndexInfo) (accessConds []expression.Expression, filterConds []expression.Expression, ...)
- func FullIndexRange() []*types.IndexRange
- func FullIntRange() []types.IntColumnRange
- func Ranges2ColumnRanges(ranges []types.Range) []*types.ColumnRange
- func Ranges2IndexRanges(ranges []types.Range) []*types.IndexRange
- func Ranges2IntRanges(ranges []types.Range) []types.IntColumnRange
Constants ¶
const ( IntRangeType = iota ColumnRangeType IndexRangeType )
Range type.
const (
CodeUnsupportedType terror.ErrCode = 1
)
Error codes.
Variables ¶
var (
ErrUnsupportedType = terror.ClassOptimizerPlan.New(CodeUnsupportedType, "Unsupported type")
)
Error instances.
Functions ¶
func BuildIndexRange ¶
func BuildIndexRange(sc *variable.StatementContext, tblInfo *model.TableInfo, index *model.IndexInfo, accessInAndEqCount int, accessCondition []expression.Expression) ([]*types.IndexRange, error)
BuildIndexRange will build range of index for PhysicalIndexScan
func BuildRange ¶
func BuildRange(sc *variable.StatementContext, conds []expression.Expression, rangeType int, cols []*expression.Column, lengths []int) (retRanges []types.Range, accessConditions, otherConditions []expression.Expression, _ error)
BuildRange is a method which can calculate IntColumnRange, ColumnRange, IndexRange.
func BuildTableRange ¶
func BuildTableRange(accessConditions []expression.Expression, sc *variable.StatementContext) ([]types.IntColumnRange, error)
BuildTableRange will build range of pk for PhysicalTableScan
func DetachColumnConditions ¶
func DetachColumnConditions(conditions []expression.Expression, colName model.CIStr) ([]expression.Expression, []expression.Expression)
DetachColumnConditions distinguishes between access conditions and filter conditions from conditions.
func DetachIndexFilterConditions ¶
func DetachIndexFilterConditions(conditions []expression.Expression, indexColumns []*model.IndexColumn, table *model.TableInfo) ([]expression.Expression, []expression.Expression)
DetachIndexFilterConditions will detach the access conditions from other conditions.
func DetachIndexScanConditions ¶
func DetachIndexScanConditions(conditions []expression.Expression, index *model.IndexInfo) (accessConds []expression.Expression, filterConds []expression.Expression, accessEqualCount int, accessInAndEqCount int)
DetachIndexScanConditions will detach the index filters from table filters.
func FullIndexRange ¶
func FullIndexRange() []*types.IndexRange
FullIndexRange is (-∞, +∞) for IndexRange.
func FullIntRange ¶
func FullIntRange() []types.IntColumnRange
FullIntRange is (-∞, +∞) for IntColumnRange.
func Ranges2ColumnRanges ¶
func Ranges2ColumnRanges(ranges []types.Range) []*types.ColumnRange
Ranges2ColumnRanges changes []types.Range to []*types.ColumnRange
func Ranges2IndexRanges ¶
func Ranges2IndexRanges(ranges []types.Range) []*types.IndexRange
Ranges2IndexRanges changes []types.Range to []*types.IndexRange
func Ranges2IntRanges ¶
func Ranges2IntRanges(ranges []types.Range) []types.IntColumnRange
Ranges2IntRanges changes []types.Range to []types.IntColumnRange
Types ¶
This section is empty.