# 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.
ColumnInfos2Columns converts a slice of ColumnInfo to a slice of Column with empty DBName.
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.
ConvertCol2CorCol will convert the column in the condition which can be found in outerSchema to a correlated column whose Column is this column.
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.
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.
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.
IsCurrentTimestampExpr returns whether e is CurrentTimestamp expression.
IsHybridType checks whether a ClassString expression is a hybrid type value which will return different types of value in different context.
MergeSchema will merge two schema into one schema.
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.
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.
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.
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.
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.