package
2.1.0-rc.2+incompatible
Repository: https://github.com/coderushing/tidb.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
BuildCastFunction builds a CAST ScalarFunction from the Expression.
BuildCastFunction4Union build a implicitly CAST ScalarFunction from the Union Expression.
CheckArgsNotMultiColumnRow checks the args are not multi-column row.
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.
ColumnSliceIsIntersect checks whether two column slice is intersected.
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.
ExtractCorColumns extracts correlated column from given expression.
ExtractFiltersFromDNFs checks whether the cond is DNF.
Filter the input expressions, append the results to result.
FindPrefixOfIndex will find columns in index by checking the unique id.
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.
GetFuncArg gets the argument of the function at idx.
GetRowLen gets the length if the func is row, returns 1 if not row.
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.
ParseSimpleExprsWithSchema parses simple expression string to Expression.
ParseSimpleExprWithTableInfo parses simple expression string to Expression.
PBToExpr converts pb structure to expression.
PopRowFirstArg pops the first element and returns the rest of row.
PropagateConstant propagate constant values of deterministic predicates in a condition.
PushDownNot pushes the `not` function down to the expression's arguments.
RefineComparedConstant changes an non-integer constant argument to its ceiling or floor result by the given op.
RewriteSimpleExprWithSchema rewrites simple ast.ExprNode to expression.Expression.
RewriteSimpleExprWithTableInfo rewrites simple ast.ExprNode to expression.Expression.
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.
SortedExplainExpressionList generates explain information for a list of expressions in order.
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.
ToPBFieldType converts *types.FieldType to *tipb.FieldType.
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.
# Variables
Error instances.
Error instances.
All the exported errors are defined here:.
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.