package
1.1.0-beta
Repository: https://github.com/dsdashun/tidb.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BuildCastFunction builds a CAST ScalarFunction from the Expression.
ColInfo2Col finds the corresponding column of the ColumnInfo in a column slice.
Column2Exprs will transfer column slice to expression slice.
ColumnInfos2ColumnsWithDBName converts a slice of ColumnInfo to a slice of Column.
ColumnSubstitute substitutes the columns in filter to expressions in select fields.
ComposeCNFCondition composes CNF items into a balance deep CNF tree, which benefits a lot for pb decoder/encoder.
ComposeDNFCondition composes DNF items into a balance deep DNF tree.
Contains tests if `exprs` contains `e`.
EvalBool evaluates expression list to a boolean value.
EvaluateExprWithNull sets columns in schema as null and calculate the final result of the scalar function.
ExplainColumnList generates explain information for a list of columns.
ExplainExpressionList generates explain information for a list of expressions.
ExpressionsToPB converts expression to tipb.Expr.
ExpressionsToPBList converts expressions to tipb.Expr list for new plan.
ExprFromSchema checks if all columns of this expression are from the same schema.
ExtractColumns extracts all columns from an expression.
ExtractColumnsFromExpressions is a more efficient version of ExtractColumns for batch operation.
Filter the input expressions, append the results to result.
FlattenCNFConditions extracts CNF expression's leaf item.
FlattenDNFConditions extracts DNF expression's leaf item.
FoldConstant does constant folding optimization on an expression excluding deferred ones.
GetAccurateCmpType uses a more complex logic to decide the EvalType of the two args when compare with each other than getBaseCmpType does.
GetTimeValue gets the time value with type tp.
GroupByItemToPB converts group by items to pb.
IndexInfo2Cols gets the corresponding []*Column of the indexInfo's []*IndexColumn, together with a []int containing their lengths.
IsBinaryLiteral checks whether an expression is a binary literal.
IsCurrentTimestampExpr returns whether e is CurrentTimestamp expression.
MergeSchema will merge two schema into one schema.
NewEvaluatorSuit creates an EvaluatorSuit to evaluate all the exprs.
NewFunction creates a new scalar function or constant.
NewFunctionInternal is similar to NewFunction, but do not returns error, should only be used internally.
NewPBConverter creates a PbConverter.
NewSchema returns a schema made by its parameter.
NewValuesFunc creates a new values function.
PBToExpr converts pb structure to expression.
PropagateConstant propagate constant values of equality predicates and inequality predicates in a condition.
PushDownNot pushes the `not` function down to the expression's arguments.
RefineConstantArg changes the constant argument to it's ceiling or flooring result by the given op.
ScalarFuncs2Exprs converts []*ScalarFunction to []Expression.
SetBinFlagOrBinStr sets resTp to binary string if argTp is a binary string, if not, sets the binary flag of resTp to true if argTp has binary flag.
SortByItemToPB converts order by items to pb.
SplitCNFItems splits CNF items.
SplitDNFItems splits DNF items.
SubstituteCorCol2Constant will substitute correlated column to constant value which it contains.
TableInfo2Schema converts table info to schema with empty DBName.
TableInfo2SchemaWithDBName converts table info to schema.
Vectorizable checks whether a list of expressions can employ vectorized execution.
VectorizedExecute evaluates a list of expressions column by column and append their results to "output" Chunk.
VectorizedFilter applies a list of filters to a Chunk and returns a bool slice, which indicates whether a row is passed the filters.
WrapWithCastAsDecimal wraps `expr` with `cast` if the return type of expr is not type decimal, otherwise, returns `expr` directly.
WrapWithCastAsDuration wraps `expr` with `cast` if the return type of expr is not type duration, otherwise, returns `expr` directly.
WrapWithCastAsInt wraps `expr` with `cast` if the return type of expr is not type int, otherwise, returns `expr` directly.
WrapWithCastAsJSON wraps `expr` with `cast` if the return type of expr is not type json, otherwise, returns `expr` directly.
WrapWithCastAsReal wraps `expr` with `cast` if the return type of expr is not type real, otherwise, returns `expr` directly.
WrapWithCastAsString wraps `expr` with `cast` if the return type of expr is not type string, otherwise, returns `expr` directly.
WrapWithCastAsTime wraps `expr` with `cast` if the return type of expr is not same as type of the specified `tp` , otherwise, returns `expr` directly.

# Constants

Supported hash length of SHA-2 family.
Supported hash length of SHA-2 family.
Supported hash length of SHA-2 family.
Supported hash length of SHA-2 family.
Supported hash length of SHA-2 family.

# Variables

Error instances.
Error instances.
EvalAstExpr evaluates ast expression directly.
MaxPropagateColsCnt means the max number of columns that can participate propagation.
Null stands for null constant.
One stands for a number 1.
UnCacheableFunctions stores functions which can not be cached to plan cache.
Zero stands for a number 0.

# Structs

Assignment represents a set assignment in Update, such as Update t set c1 = hex(12), c2 = c3 where c2 = 1.
Column represents a column.
Constant stands for a constant value.
CorrelatedColumn stands for a column in a correlated sub query.
EvaluatorSuit is responsible for the evaluation of a list of expressions.
PbConverter supplys methods to convert TiDB expressions to TiPB.
ScalarFunction is the function that returns a value.
Schema stands for the row schema and unique key information get from input.
VarAssignment represents a variable assignment in Set, such as set global a = 1.

# Interfaces

Expression represents all scalar expression in SQL.

# Type aliases

CNFExprs stands for a CNF expression.
KeyInfo stores the columns of one unique key or primary key.