package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Packages

# Functions

AddExpr4EqAndInCondition add the `tidb_shard(x) = xxx` prefix Add tidb_shard() for EQ and IN function.
AddGcColumn4EqCond add the `tidb_shard(x) = xxx` prefix for equal condition For param explanation, please refer to the function `AddGcColumnCond`.
AddGcColumn4InCond add the `tidb_shard(x) = xxx` for `IN` condition For param explanation, please refer to the function `AddGcColumnCond`.
AddGcColumnCond add the `tidb_shard(x) = xxx` to the condition @param[in] cols the columns of shard index, such as [tidb_shard(a), a, ...] @param[in] accessCond the conditions relative to the index and arranged by the index column order.
AppendConditionsIfNotExist appends conditions if they are absent.
AppendRanges2PointRanges appends additional ranges to point ranges.
BuildColumnRange builds range from access conditions for general columns.
BuildTableRange builds range of PK column for PhysicalTableScan.
CutDatumByPrefixLen cuts the datum according to the prefix length.
DetachCondAndBuildRangeForIndex will detach the index filters from table filters.
DetachCondAndBuildRangeForPartition will detach the index filters from table filters.
DetachCondsForColumn detaches access conditions for specified column from other filter conditions.
DetachSimpleCondAndBuildRangeForIndex will detach the index filters from table filters.
ExtractAccessConditionsForColumn extracts the access conditions used for range calculation.
ExtractColumnsFromExpr get all fields from input expression virtaulExpr.
ExtractEqAndInCondition will split the given condition into three parts by the information of index columns and their lengths.
FullIntRange is used for table range.
FullNotNullRange is (-∞, +∞) for Range.
FullRange is [null, +∞) for Range.
HasFullRange checks if any range in the slice is a full range.
IsValidShardIndex Check whether the definition of shard index is valid.
MergeDNFItems4Col receives a slice of DNF conditions, merges some of them which can be built into ranges on a single column, then returns.
NeedAddColumn4EqCond `tidb_shard(x) = xxx` For param explanation, please refer to the function `NeedAddGcColumn4ShardIndex`.
NeedAddColumn4InCond `tidb_shard(x) = xxx` For param explanation, please refer to the function `NeedAddGcColumn4ShardIndex`.
NeedAddGcColumn4ShardIndex check whether to add `tidb_shard(x) = xxx` @param[in] cols the columns of shard index, such as [tidb_shard(a), a, ...] @param[in] accessCond the conditions relative to the index and arranged by the index column order.
NullRange is [null, null] for Range.
RangeSingleColToString prints a single column of a Range into a string which can appear in an SQL as a condition.
RangesToString print a list of Ranges into a string which can appear in an SQL as a condition.
ReachPrefixLen checks whether the length of v is equal to the prefix length.
UnionRanges sorts `ranges`, union adjacent ones if possible.

# Constants

RangeType constants.
EmptyRangeSize is the size of empty range.
RangeType constants.
RangeType constants.

# Structs

DetachRangeResult wraps up results when detaching conditions and builing ranges.
Range represents a range generated in physical plan building phase.

# Interfaces

MutableRanges represents a range may change after it is created.

# Type aliases

Ranges implements the MutableRanges interface for range array.
RangeType is alias for int.