Documentation ¶
Overview ¶
Package plan is a generated GoMock package.
Index ¶
- Constants
- Variables
- func AddColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterAddCol, ...) error
- func AddPrimaryKey(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.PrimaryKeyIndex, ...) error
- func AddTablePartitions(ctx CompilerContext, alterTable *plan.AlterTable, ...) (*plan.AlterTableAddPartition, error)
- func AlterColumn(ctx CompilerContext, alterPlan *plan.AlterTable, ...) error
- func AssignAuxIdForExpr(expr *plan.Expr, start int32) int32
- func BindFuncExprImplByPlanExpr(ctx context.Context, name string, args []*Expr) (*plan.Expr, error)
- func BuildVectorsByData(datas [][2]any, dataTypes []uint8, mp *mpool.MPool) []*vector.Vector
- func ByteSliceToUint64(bytes []byte) uint64
- func ChangeColumn(ctx CompilerContext, alterPlan *plan.AlterTable, ...) error
- func CheckColumnNameValid(ctx context.Context, colName string) error
- func CheckModifyColumnForeignkeyConstraint(ctx CompilerContext, tbInfo *TableDef, originalCol, newCol *ColDef) error
- func ConstandFoldList(exprs []*plan.Expr, proc *process.Process, varAndParamIsConst bool) ([]*plan.Expr, error)
- func ConstantFold(bat *batch.Batch, expr *plan.Expr, proc *process.Process, ...) (*plan.Expr, error)
- func ConstructCreateTableSQL(tableObjRef *plan.ObjectRef, tableDef *plan.TableDef, snapshot Snapshot, ...) (string, error)
- func CreateIndexDef(indexInfo *tree.Index, indexTableName, indexAlgoTableType string, ...) (*plan.IndexDef, error)
- func DeepCopyAnalyzeInfo(analyzeinfo *plan.AnalyzeInfo) *plan.AnalyzeInfo
- func DeepCopyClusterTable(cluster *plan.ClusterTable) *plan.ClusterTable
- func DeepCopyColData(col *plan.ColData) *plan.ColData
- func DeepCopyColDef(col *plan.ColDef) *plan.ColDef
- func DeepCopyDataDefinition(old *plan.DataDefinition) *plan.DataDefinition
- func DeepCopyDefault(def *plan.Default) *plan.Default
- func DeepCopyDeleteCtx(ctx *plan.DeleteCtx) *plan.DeleteCtx
- func DeepCopyIndexDef(indexDef *plan.IndexDef) *plan.IndexDef
- func DeepCopyIndexOption(indexOption *plan.IndexOption) *plan.IndexOption
- func DeepCopyInsertCtx(ctx *plan.InsertCtx) *plan.InsertCtx
- func DeepCopyLockTarget(target *plan.LockTarget) *plan.LockTarget
- func DeepCopyNode(node *plan.Node) *plan.Node
- func DeepCopyNumberList[T constraints.Integer](src []T) []T
- func DeepCopyObjectRef(ref *plan.ObjectRef) *plan.ObjectRef
- func DeepCopyOnDupliateKeyCtx(ctx *plan.OnDuplicateKeyCtx) *plan.OnDuplicateKeyCtx
- func DeepCopyOnUpdate(old *plan.OnUpdate) *plan.OnUpdate
- func DeepCopyOrderBy(orderBy *plan.OrderBySpec) *plan.OrderBySpec
- func DeepCopyPartitionPrune(partitionPrune *plan.PartitionPrune) *plan.PartitionPrune
- func DeepCopyPreDeleteCtx(ctx *plan.PreDeleteCtx) *plan.PreDeleteCtx
- func DeepCopyPreInsertCtx(ctx *plan.PreInsertCtx) *plan.PreInsertCtx
- func DeepCopyPreInsertUkCtx(ctx *plan.PreInsertUkCtx) *plan.PreInsertUkCtx
- func DeepCopyPrimaryKeyDef(pkeyDef *plan.PrimaryKeyDef) *plan.PrimaryKeyDef
- func DeepCopyQuery(qry *plan.Query) *plan.Query
- func DeepCopyReplaceCtx(oldCtx *plan.ReplaceCtx) *plan.ReplaceCtx
- func DeepCopySampleFuncSpec(source *plan.SampleFuncSpec) *plan.SampleFuncSpec
- func DeepCopySliceInt64(s []int64) []int64
- func DeepCopyStats(stats *plan.Stats) *plan.Stats
- func DeepCopyStringList(src []string) []string
- func DeepCopyTableDef(table *plan.TableDef, withCols bool) *plan.TableDef
- func DeepCopyTableDefList(src []*plan.TableDef) []*plan.TableDef
- func DeepCopyType(typ *plan.Type) *plan.Type
- func DefaultHugeStats() *plan.Stats
- func DefaultMinimalStats() *plan.Stats
- func DefaultStats() *plan.Stats
- func DefaultValueIsNull(Default *plan.Default) bool
- func DropColumn(ctx CompilerContext, alterPlan *plan.AlterTable, colName string, ...) error
- func DropPrimaryKey(ctx CompilerContext, alterPlan *plan.AlterTable, alterCtx *AlterTableContext) error
- func EscapeFormat(s string) string
- func EvalFilterExpr(ctx context.Context, expr *plan.Expr, bat *batch.Batch, proc *process.Process) (bool, error)
- func EvalPlanExpr(ctx context.Context, expr *plan.Expr, process *process.Process) (*plan.Expr, error)
- func ExprIsZonemappable(ctx context.Context, expr *plan.Expr) bool
- func ExtractToDateReturnType(format string) (tp types.T, fsp int)
- func Find[T ~string | ~int, S any](data map[T]S, val T) bool
- func FormatColType(colType plan.Type) string
- func FormatExpr(expr *plan.Expr) string
- func FormatExprs(exprs []*plan.Expr) string
- func GenConstraintName() string
- func GetBindings(expr *plan.Expr) []int32
- func GetCenterValueForZMSigned(zm objectio.ZoneMap) int64
- func GetCenterValueForZMUnsigned(zm objectio.ZoneMap) uint64
- func GetColumnMapByExpr(expr *plan.Expr, tableDef *plan.TableDef, columnMap map[int]int)
- func GetColumnMapByExprs(exprs []*plan.Expr, tableDef *plan.TableDef, columnMap map[int]int)
- func GetColumnsByExpr(expr *plan.Expr, tableDef *plan.TableDef) (columnMap map[int]int, defColumns, exprColumns []int, maxCol int)
- func GetFkReferredTo(ctx CompilerContext, db, table string) (map[FkReferKey]map[string][]*FkReferDef, error)
- func GetForETLWithType(param *tree.ExternParam, prefix string) (res fileservice.ETLFileService, readPath string, err error)
- func GetFunctionArgTypeStrFromAst(arg tree.FunctionArg) (string, error)
- func GetFunctionTypeStrFromAst(typRef tree.ResolvableTypeReference) (string, error)
- func GetHashColumn(expr *plan.Expr) (*plan.ColRef, int32)
- func GetInFilterCardLimit() int32
- func GetInFilterCardLimitOnPK(tableCnt float64) int32
- func GetRangeShuffleIndexForZM(minVal, maxVal int64, zm objectio.ZoneMap, upplerLimit uint64) uint64
- func GetRangeShuffleIndexForZMSignedSlice(val []int64, zm objectio.ZoneMap) uint64
- func GetRangeShuffleIndexForZMUnsignedSlice(val []uint64, zm objectio.ZoneMap) uint64
- func GetRangeShuffleIndexSignedMinMax(minVal, maxVal, currentVal int64, upplerLimit uint64) uint64
- func GetRangeShuffleIndexSignedSlice(val []int64, currentVal int64) uint64
- func GetRangeShuffleIndexUnsignedMinMax(minVal, maxVal, currentVal uint64, upplerLimit uint64) uint64
- func GetRangeShuffleIndexUnsignedSlice(val []uint64, currentVal uint64) uint64
- func GetRowSizeFromTableDef(tableDef *TableDef, ignoreHiddenKey bool) float64
- func GetShuffleDop(cpunum int) (dop int)
- func GetSortOrder(tableDef *plan.TableDef, colPos int32) int
- func GetSortOrderByName(tableDef *plan.TableDef, colName string) int
- func GetSqlForFkReferredTo(db, table string) string
- func GetUniqueColAndIdxFromTableDef(tableDef *TableDef) []map[string]int
- func GetVarValue(ctx context.Context, compCtx CompilerContext, proc *process.Process, ...) (*plan.Expr, error)
- func HasColExpr(expr *plan.Expr, pos int32) int32
- func HasFkSelfReferOnly(tableDef *TableDef) bool
- func HasMoCtrl(expr *plan.Expr) bool
- func HasTag(expr *plan.Expr, tag int32) bool
- func InitInfileParam(param *tree.ExternParam) error
- func InitNullMap(param *tree.ExternParam, ctx CompilerContext) error
- func InitS3Param(param *tree.ExternParam) error
- func InternalTable(tableDef *TableDef) bool
- func IsEqualFunc(id int64) bool
- func IsEquiJoin2(exprs []*plan.Expr) bool
- func IsFalseExpr(e *Expr) bool
- func IsFkBannedDatabase(db string) bool
- func IsFkSelfRefer(fkDbName, fkTableName, curDbName, curTableName string) bool
- func IsForeignKeyChecksEnabled(ctx CompilerContext) (bool, error)
- func IsShuffleChildren(n *plan.Node, ns []*plan.Node) bool
- func IsSnapshotValid(snapshot *Snapshot) bool
- func IsTpQuery(qry *plan.Query) bool
- func MakePlan2Decimal128ExprWithType(v types.Decimal128, typ *Type) *plan.Expr
- func MakePlan2Decimal64ExprWithType(v types.Decimal64, typ *Type) *plan.Expr
- func MakePlan2NullTextConstExprWithType(v string) *plan.Expr
- func MakeRuntimeFilter(tag int32, matchPrefix bool, upperlimit int32, expr *Expr) *plan.RuntimeFilterSpec
- func ModifyColumn(ctx CompilerContext, alterPlan *plan.AlterTable, ...) error
- func NewShuffleRange(isString bool) *pb.ShuffleRange
- func NewStatsInfo() *pb.StatsInfo
- func OrderByColumn(ctx CompilerContext, alterPlan *plan.AlterTable, ...) error
- func PartitionFuncConstantFold(bat *batch.Batch, e *plan.Expr, proc *process.Process) (*plan.Expr, error)
- func PrintStats(qry *plan.Query) string
- func ReCalcNodeStats(nodeID int32, builder *QueryBuilder, recursive bool, leafNode bool, ...)
- func ReCalcQueryStats(builder *QueryBuilder, query *plan.Query)
- func ReadDir(param *tree.ExternParam) (fileList []string, fileSize []int64, err error)
- func RemoveIf[T any](data []T, pred func(t T) bool) []T
- func RenameColumn(ctx CompilerContext, alterPlan *plan.AlterTable, ...) error
- func ResetAuxIdForExpr(expr *plan.Expr)
- func ResetPreparePlan(ctx CompilerContext, preparePlan *Plan) ([]*plan.ObjectRef, []int32, error)
- func ResolveAlterTableAlgorithm(ctx context.Context, validAlterSpecs []tree.AlterTableOption) (algorithm plan.AlterTable_AlgorithmType)
- func ShuffleRangeReEvalSigned(ranges []float64, k2 int, nullCnt int64, tableCnt int64) []int64
- func ShuffleRangeReEvalUnsigned(ranges []float64, k2 int, nullCnt int64, tableCnt int64) []uint64
- func SimpleCharHashToRange(bytes []byte, upperLimit uint64) uint64
- func SimpleInt64HashToRange(i uint64, upperLimit uint64) uint64
- func StatFile(param *tree.ExternParam) error
- func UpdateStatsInfo(info *InfoFromZoneMap, tableDef *plan.TableDef, s *pb.StatsInfo)
- func VarlenaToUint64(v *types.Varlena, area []byte) uint64
- func VarlenaToUint64Inline(v *types.Varlena) uint64
- type AlterTableContext
- type BaseOptimizer
- type BindContext
- type Binder
- type Binding
- type BindingTreeNode
- type CTERef
- type ClusterByDef
- type ClusterTable
- type ColDef
- func FindColumn(cols []*ColDef, name string) *ColDef
- func FindColumnByColId(cols []*ColDef, colId uint64) *ColDef
- func GetColDefFromTable(Cols []*ColDef, hidenColName string) *ColDef
- func GetResultColumnsFromPlan(p *Plan) []*ColDef
- func MakeHiddenColDefByName(name string) *ColDef
- func MakeRowIdColDef() *ColDef
- type ColRef
- type ColRefRemapping
- type CompilerContext
- type Const
- type ConstantFoldRule
- type DefaultBinder
- func (b *DefaultBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *DefaultBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *DefaultBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *DefaultBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *DefaultBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *DefaultBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *DefaultBinder) GetContext() context.Context
- type ExecInfo
- type ExecType
- type ExpandAliasMode
- type Expr
- func DeepCopyExpr(expr *Expr) *Expr
- func DeepCopyExprList(list []*Expr) []*Expr
- func DeepProcessExprForGroupConcat(expr *Expr, ctx *BindContext) *Expr
- func GenUniqueColCheckExpr(ctx context.Context, tableDef *TableDef, uniqueCols []map[string]int, ...) ([]*Expr, error)
- func GenUniqueColJoinExpr(ctx context.Context, tableDef *TableDef, uniqueCols []map[string]int, ...) (*Expr, error)
- func MakeFalseExpr() *Expr
- func MakeInExpr(ctx context.Context, left *Expr, length int32, data []byte, matchPrefix bool) *Expr
- func MakeIntervalExpr(num int64, str string) *Expr
- func SplitCNFItems(onExpr *Expr) []*Expr
- func SplitDNFItems(onExpr *Expr) []*Expr
- type FkColName
- type FkData
- type FkReferDef
- type FkReferKey
- type ForeignKeyDef
- type GetParamRule
- type GroupBinder
- func (b *GroupBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *GroupBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *GroupBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *GroupBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *GroupBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *GroupBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *GroupBinder) GetContext() context.Context
- type HavingBinder
- func (b *HavingBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *HavingBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *HavingBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *HavingBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *HavingBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *HavingBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *HavingBinder) GetContext() context.Context
- type IndexDef
- type InfoFromZoneMap
- type KeyHashPartitionPruner
- type LimitBinder
- func (b *LimitBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *LimitBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *LimitBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *LimitBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *LimitBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *LimitBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *LimitBinder) GetContext() context.Context
- type MaxValue
- type MoCacheColType
- type MoConfigColType
- type MoLocksColType
- type MoTransactionsColType
- type MockBinder
- func (m *MockBinder) BindAggFunc(arg0 string, arg1 *tree.FuncExpr, arg2 int32, arg3 bool) (*plan.Expr, error)
- func (m *MockBinder) BindColRef(arg0 *tree.UnresolvedName, arg1 int32, arg2 bool) (*plan.Expr, error)
- func (m *MockBinder) BindExpr(arg0 tree.Expr, arg1 int32, arg2 bool) (*plan.Expr, error)
- func (m *MockBinder) BindSubquery(arg0 *tree.Subquery, arg1 bool) (*plan.Expr, error)
- func (m *MockBinder) BindTimeWindowFunc(arg0 string, arg1 *tree.FuncExpr, arg2 int32, arg3 bool) (*plan.Expr, error)
- func (m *MockBinder) BindWinFunc(arg0 string, arg1 *tree.FuncExpr, arg2 int32, arg3 bool) (*plan.Expr, error)
- func (m *MockBinder) EXPECT() *MockBinderMockRecorder
- func (m *MockBinder) GetContext() context.Context
- type MockBinderMockRecorder
- func (mr *MockBinderMockRecorder) BindAggFunc(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockBinderMockRecorder) BindColRef(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockBinderMockRecorder) BindExpr(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockBinderMockRecorder) BindSubquery(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockBinderMockRecorder) BindTimeWindowFunc(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockBinderMockRecorder) BindWinFunc(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockBinderMockRecorder) GetContext() *gomock.Call
- type MockCompilerContext
- func (m *MockCompilerContext) CheckSubscriptionValid(subName, accName string, pubName string) error
- func (m *MockCompilerContext) CheckTimeStampValid(ts int64) (bool, error)
- func (m *MockCompilerContext) DatabaseExists(name string, snapshot Snapshot) bool
- func (m *MockCompilerContext) DefaultDatabase() string
- func (m *MockCompilerContext) GetAccountId() (uint32, error)
- func (m *MockCompilerContext) GetBuildingAlterView() (bool, string, string)
- func (m *MockCompilerContext) GetContext() context.Context
- func (m *MockCompilerContext) GetDatabaseId(dbName string, snapshot Snapshot) (uint64, error)
- func (m *MockCompilerContext) GetLowerCaseTableNames() int64
- func (m *MockCompilerContext) GetPrimaryKeyDef(dbName string, tableName string, snapshot Snapshot) []*ColDef
- func (m *MockCompilerContext) GetProcess() *process.Process
- func (m *MockCompilerContext) GetQueryResultMeta(uuid string) ([]*ColDef, string, error)
- func (m *MockCompilerContext) GetQueryingSubscription() *SubscriptionMeta
- func (m *MockCompilerContext) GetRootSql() string
- func (m *MockCompilerContext) GetSnapshot() *Snapshot
- func (m *MockCompilerContext) GetStatsCache() *StatsCache
- func (m *MockCompilerContext) GetSubscriptionMeta(dbName string, snapshot Snapshot) (*SubscriptionMeta, error)
- func (m *MockCompilerContext) GetUserName() string
- func (m *MockCompilerContext) GetViews() []string
- func (m *MockCompilerContext) IsPublishing(dbName string) (bool, error)
- func (m *MockCompilerContext) ReplacePlan(execPlan *plan.Execute) (*plan.Plan, tree.Statement, error)
- func (m *MockCompilerContext) Resolve(dbName string, tableName string, snapshot Snapshot) (*ObjectRef, *TableDef)
- func (m *MockCompilerContext) ResolveAccountIds(accountNames []string) ([]uint32, error)
- func (m *MockCompilerContext) ResolveById(tableId uint64, snapshot Snapshot) (*ObjectRef, *TableDef)
- func (m *MockCompilerContext) ResolveSnapshotWithSnapshotName(snapshotName string) (*Snapshot, error)
- func (m *MockCompilerContext) ResolveSubscriptionTableById(tableId uint64, pubmeta *SubscriptionMeta) (*ObjectRef, *TableDef)
- func (m *MockCompilerContext) ResolveUdf(name string, ast []*plan.Expr) (*function.Udf, error)
- func (m *MockCompilerContext) ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error)
- func (m *MockCompilerContext) SetBuildingAlterView(yesOrNo bool, dbName, viewName string)
- func (m *MockCompilerContext) SetQueryingSubscription(*SubscriptionMeta)
- func (m *MockCompilerContext) SetSnapshot(snapshot *Snapshot)
- func (m *MockCompilerContext) SetViews(views []string)
- func (m *MockCompilerContext) Stats(obj *ObjectRef, snapshot Snapshot) (*pb.StatsInfo, error)
- type MockCompilerContext2
- func (m *MockCompilerContext2) CheckSubscriptionValid(subName, accName, pubName string) error
- func (m *MockCompilerContext2) CheckTimeStampValid(ts int64) (bool, error)
- func (m *MockCompilerContext2) DatabaseExists(name string, snapshot Snapshot) bool
- func (m *MockCompilerContext2) DefaultDatabase() string
- func (m *MockCompilerContext2) EXPECT() *MockCompilerContext2MockRecorder
- func (m *MockCompilerContext2) GetAccountId() (uint32, error)
- func (m *MockCompilerContext2) GetBuildingAlterView() (bool, string, string)
- func (m *MockCompilerContext2) GetContext() context.Context
- func (m *MockCompilerContext2) GetDatabaseId(dbName string, snapshot Snapshot) (uint64, error)
- func (m *MockCompilerContext2) GetLowerCaseTableNames() int64
- func (m *MockCompilerContext2) GetPrimaryKeyDef(dbName, tableName string, snapshot Snapshot) []*ColDef
- func (m *MockCompilerContext2) GetProcess() *process.Process
- func (m *MockCompilerContext2) GetQueryResultMeta(uuid string) ([]*ColDef, string, error)
- func (m *MockCompilerContext2) GetQueryingSubscription() *SubscriptionMeta
- func (m *MockCompilerContext2) GetRootSql() string
- func (m *MockCompilerContext2) GetSnapshot() *Snapshot
- func (m *MockCompilerContext2) GetStatsCache() *StatsCache
- func (m *MockCompilerContext2) GetSubscriptionMeta(dbName string, snapshot Snapshot) (*SubscriptionMeta, error)
- func (m *MockCompilerContext2) GetUserName() string
- func (m *MockCompilerContext2) GetViews() []string
- func (m *MockCompilerContext2) IsPublishing(dbName string) (bool, error)
- func (m *MockCompilerContext2) ReplacePlan(execPlan *plan.Execute) (*plan.Plan, tree.Statement, error)
- func (m *MockCompilerContext2) Resolve(schemaName, tableName string, snapshot Snapshot) (*ObjectRef, *TableDef)
- func (m *MockCompilerContext2) ResolveAccountIds(accountNames []string) ([]uint32, error)
- func (m *MockCompilerContext2) ResolveById(tableId uint64, snapshot Snapshot) (*ObjectRef, *TableDef)
- func (m *MockCompilerContext2) ResolveSnapshotWithSnapshotName(snapshotName string) (*Snapshot, error)
- func (m *MockCompilerContext2) ResolveSubscriptionTableById(tableId uint64, pubmeta *SubscriptionMeta) (*ObjectRef, *TableDef)
- func (m *MockCompilerContext2) ResolveUdf(name string, args []*Expr) (*function.Udf, error)
- func (m *MockCompilerContext2) ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error)
- func (m *MockCompilerContext2) SetBuildingAlterView(yesOrNo bool, dbName, viewName string)
- func (m *MockCompilerContext2) SetQueryingSubscription(meta *SubscriptionMeta)
- func (m *MockCompilerContext2) SetSnapshot(snapshot *Snapshot)
- func (m *MockCompilerContext2) SetViews(views []string)
- func (m *MockCompilerContext2) Stats(obj *ObjectRef, snapshot Snapshot) (*statsinfo.StatsInfo, error)
- type MockCompilerContext2MockRecorder
- func (mr *MockCompilerContext2MockRecorder) CheckSubscriptionValid(subName, accName, pubName interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) CheckTimeStampValid(ts interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) DatabaseExists(name, snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) DefaultDatabase() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetAccountId() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetBuildingAlterView() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetContext() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetDatabaseId(dbName, snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetLowerCaseTableNames() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetPrimaryKeyDef(dbName, tableName, snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetProcess() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetQueryResultMeta(uuid interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetQueryingSubscription() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetRootSql() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetSnapshot() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetStatsCache() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetSubscriptionMeta(dbName, snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetUserName() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) GetViews() *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) IsPublishing(dbName interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ReplacePlan(execPlan interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) Resolve(schemaName, tableName, snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ResolveAccountIds(accountNames interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ResolveById(tableId, snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ResolveSnapshotWithSnapshotName(snapshotName interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ResolveSubscriptionTableById(tableId, pubmeta interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ResolveUdf(name, args interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) ResolveVariable(varName, isSystemVar, isGlobalVar interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) SetBuildingAlterView(yesOrNo, dbName, viewName interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) SetQueryingSubscription(meta interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) SetSnapshot(snapshot interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) SetViews(views interface{}) *gomock.Call
- func (mr *MockCompilerContext2MockRecorder) Stats(obj, snapshot interface{}) *gomock.Call
- type MockOptimizer
- type MockOptimizer2
- type MockOptimizer2MockRecorder
- type MockRule
- type MockRuleMockRecorder
- type MultiTableIndex
- type NameTuple
- type Node
- type ObjectRef
- type Optimizer
- type OptimizerHints
- type OrderBinder
- type OrderBySpec
- type OriginTableMessageForFuzzy
- type PartitionBinder
- func (p *PartitionBinder) BindAggFunc(s string, expr *tree.FuncExpr, i int32, b bool) (*plan.Expr, error)
- func (p *PartitionBinder) BindColRef(name *tree.UnresolvedName, i int32, b bool) (*plan.Expr, error)
- func (p *PartitionBinder) BindExpr(expr tree.Expr, i int32, b bool) (*plan.Expr, error)
- func (p *PartitionBinder) BindSubquery(subquery *tree.Subquery, b bool) (*plan.Expr, error)
- func (p *PartitionBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (p *PartitionBinder) BindWinFunc(s string, expr *tree.FuncExpr, i int32, b bool) (*plan.Expr, error)
- func (b *PartitionBinder) GetContext() context.Context
- type PartitionByDef
- type PartitionPruneResult
- type Plan
- type Plan_Query
- type PrimaryKeyDef
- type ProjectionBinder
- func (b *ProjectionBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *ProjectionBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *ProjectionBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *ProjectionBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *ProjectionBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *ProjectionBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *ProjectionBinder) GetContext() context.Context
- type PropertiesDef
- type Property
- type Query
- type QueryBuilder
- type RecomputeRealTimeRelatedFuncRule
- type RemapInfo
- type ResetParamOrderRule
- type ResetParamRefRule
- type ResetVarRefRule
- type RowsetData
- type Rule
- type SampleFuncCtx
- type Schema
- type SetBinder
- func (s *SetBinder) BindAggFunc(_ string, expr *tree.FuncExpr, i int32, b bool) (*plan.Expr, error)
- func (s *SetBinder) BindColRef(name *tree.UnresolvedName, i int32, b bool) (*plan.Expr, error)
- func (s *SetBinder) BindExpr(expr tree.Expr, i int32, b bool) (*plan.Expr, error)
- func (s *SetBinder) BindSubquery(subquery *tree.Subquery, b bool) (*plan.Expr, error)
- func (s *SetBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (s *SetBinder) BindWinFunc(_ string, expr *tree.FuncExpr, i int32, b bool) (*plan.Expr, error)
- func (b *SetBinder) GetContext() context.Context
- type Snapshot
- type SnapshotTenant
- type Stats
- type StatsCache
- type SubscriptionMeta
- type TableBinder
- func (b *TableBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *TableBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *TableBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *TableBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *TableBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *TableBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *TableBinder) GetContext() context.Context
- type TableDef
- type TableDefType
- type TableDef_DefType_Properties
- type Type
- type UnorderedSet
- type UpdateBinder
- func (b *UpdateBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *UpdateBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *UpdateBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *UpdateBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *UpdateBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *UpdateBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *UpdateBinder) GetContext() context.Context
- type ViewData
- type ViewDef
- type VisitPlan
- type VisitPlanRule
- type WhereBinder
- func (b *WhereBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *WhereBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *WhereBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *WhereBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)
- func (b *WhereBinder) BindTimeWindowFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *WhereBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)
- func (b *WhereBinder) GetContext() context.Context
Constants ¶
const ( TimeWindowStart = "_wstart" TimeWindowEnd = "_wend" )
const ( NotSampleByRows = -1 NotSampleByPercents = -1.0 )
const ( /* https://dev.mysql.com/doc/refman/8.0/en/create-table.html PARTITION BY If used, a partition_options clause begins with PARTITION BY. This clause contains the function that is used to determine the partition; the function returns an integer value ranging from 1 to num, where num is the number of partitions. (The maximum number of user-defined partitions which a table may contain is 1024; the number of subpartitions—discussed later in this section—is included in this maximum.) */ PartitionCountLimit = 1024 /* https://dev.mysql.com/doc/refman/8.0/en/create-table.html 1. KEY(column_list): the column_list argument is simply a list of 1 or more table columns (maximum: 16). 2. RANGE COLUMNS(column_list): The maximum number of columns that can be referenced in the column_list and value_list is 16. 3. LIST COLUMNS(column_list): The maximum number of columns that can be used in the column_list and in the elements making up the value_list is 16. */ PartitionColumnsLimit = 16 )
const ( // INTERVAL_MICROSECOND is the time or timestamp unit MICROSECOND. INTERVAL_MICROSECOND = "MICROSECOND" // INTERVAL_SECOND is the time or timestamp unit SECOND. INTERVAL_SECOND = "SECOND" // INTERVAL_MINUTE is the time or timestamp unit MINUTE. INTERVAL_MINUTE = "MINUTE" // INTERVAL_HOUR is the time or timestamp unit HOUR. INTERVAL_HOUR = "HOUR" // INTERVAL_DAY is the time or timestamp unit DAY. INTERVAL_DAY = "DAY" // INTERVAL_WEEK is the time or timestamp unit WEEK. INTERVAL_WEEK = "WEEK" // INTERVAL_MONTH is the time or timestamp unit MONTH. INTERVAL_MONTH = "MONTH" // INTERVAL_QUARTER is the time or timestamp unit QUARTER. INTERVAL_QUARTER = "QUARTER" // INTERVAL_YEAR is the time or timestamp unit YEAR. INTERVAL_YEAR = "YEAR" // INTERVAL_SECOND_MICROSECOND is the time unit SECOND_MICROSECOND. INTERVAL_SECOND_MICROSECOND = "SECOND_MICROSECOND" // INTERVAL_MINUTE_MICROSECOND is the time unit MINUTE_MICROSECOND. INTERVAL_MINUTE_MICROSECOND = "MINUTE_MICROSECOND" // INTERVAL_MINUTE_SECOND is the time unit MINUTE_SECOND. INTERVAL_MINUTE_SECOND = "MINUTE_SECOND" // INTERVAL_HOUR_MICROSECOND is the time unit HOUR_MICROSECOND. INTERVAL_HOUR_MICROSECOND = "HOUR_MICROSECOND" // INTERVAL_HOUR_SECOND is the time unit HOUR_SECOND. INTERVAL_HOUR_SECOND = "HOUR_SECOND" // INTERVAL_HOUR_MINUTE is the time unit HOUR_MINUTE. INTERVAL_HOUR_MINUTE = "HOUR_MINUTE" // INTERVAL_DAY_MICROSECOND is the time unit DAY_MICROSECOND. INTERVAL_DAY_MICROSECOND = "DAY_MICROSECOND" // INTERVAL_DAY_SECOND is the time unit DAY_SECOND. INTERVAL_DAY_SECOND = "DAY_SECOND" // INTERVAL_DAY_MINUTE is the time unit DAY_MINUTE. INTERVAL_DAY_MINUTE = "DAY_MINUTE" // INTERVAL_DAY_HOUR is the time unit DAY_HOUR. INTERVAL_DAY_HOUR = "DAY_HOUR" // INTERVAL_YEAR_MONTH is the time unit YEAR_MONTH. INTERVAL_YEAR_MONTH = "YEAR_MONTH" )
The following code shows the expected form of the expr argument for each unit value. see link: https://dev.mysql.com/doc/refman/8.0/en/expressions.html#temporal-intervals
const ( InFilterCardLimitNonPK = 10000 InFilterCardLimitPK = 320000 BloomFilterCardLimit = 100 * InFilterCardLimitNonPK InFilterSelectivityLimit = 0.05 )
const ( HashMapSizeForShuffle = 160000 MAXShuffleDOP = 64 ShuffleThreshHoldOfNDV = 50000 ShuffleTypeThreshHoldLowerLimit = 16 ShuffleTypeThreshHoldUpperLimit = 1024 )
const ( ShuffleToRegIndex int32 = 0 ShuffleToLocalMatchedReg int32 = 1 ShuffleToMultiMatchedReg int32 = 2 )
const ( MoLocksColTypeCnId = iota //MoLocksColTypeSessionId MoLocksColTypeTxnId MoLocksColTypeTableId //MoLocksColTypeTableName MoLocksColTypeLockKey MoLocksColTypeLockContent MoLocksColTypeLockMode MoLocksColTypeLockStatus MoLocksColTypeLockWait )
const ( MoConfigColTypeNodeType = iota MoConfigColTypeNodeId MoConfigColTypeName MoConfigColTypeCurrentValue MoConfigColTypeDefaultValue MoConfigColTypeInternal )
const ( MoTransactionsColTypeCnId = iota MoTransactionsColTypeTxnId MoTransactionsColTypeCreateTs MoTransactionsColTypeSnapshotTs MoTransactionsColTypePreparedTs MoTransactionsColTypeCommitTs MoTransactionsColTypeTxnMode MoTransactionsColTypeIsolation MoTransactionsColTypeUserTxn MoTransactionsColTypeTxnStatus MoTransactionsColTypeTableId MoTransactionsColTypeLockKey MoTransactionsColTypeLockContent MoTransactionsColTypeLockMode )
const ( MoCacheColTypeNodeType = iota MoCacheColTypeNodeId MoCacheColTypeType MoCacheColTypeUsed MoCacheColTypeFree MoCacheColTypeHitRatio )
const ( JoinSideNone int8 = 0 JoinSideLeft = 1 << 1 JoinSideRight = 1 << 2 JoinSideBoth = JoinSideLeft | JoinSideRight JoinSideMark = 1 << 3 )
const BlockNumForceOneCN = 200
const DefaultBlockMaxRows = 8192
const INFORMATION_SCHEMA = "information_schema"
const (
LoadParallelMinSize = 1 << 20
)
const MO_CATALOG_DB_NAME = "mo_catalog"
const MO_DEFUALT_HOSTNAME = "localhost"
const (
// MaxFsp is the maximum digit of fractional seconds part.
MaxFsp = 6
)
const ( /* Identifier Length Limits See MySQL: https://dev.mysql.com/doc/refman/8.0/en/identifiers.html */ // MaxKeyParts is max length of key parts. MaxKeyParts = 16 )
const NameClusterCenters = "cluster_centers"
const NameGroupConcat = "group_concat"
const (
// PrimaryKeyName defines primary key name.
PrimaryKeyName = "PRIMARY"
)
const SF float64 = 1
const (
/*
https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html
MySQL has hard limit of 4096 columns per table, but the effective maximum may be less for a given table.
*/
TableColumnCountLimit = 4096
)
const UnKnownColId uint64 = math.MaxUint64
Variables ¶
var ( MetadataScanColDefs = []*plan.ColDef{} MetadataScanColTypes = []types.Type{} Metadata_Rows_Cnt_Pos int32 )
var AllowedPartitionBinaryOpMap = map[tree.BinaryOp]string{ tree.PLUS: "+", tree.MINUS: "-", tree.MULTI: "*", tree.INTEGER_DIV: "div", tree.MOD: "%", }
AllowedPartitionBinaryOpMap store the operators of Binary operation expression link ref:https://dev.mysql.com/doc/refman/8.0/en/partitioning-limitations.html
var AllowedPartitionFuncMap = map[string]int{
"to_days": 1,
"to_seconds": 1,
"dayofmonth": 1,
"month": 1,
"dayofyear": 1,
"quarter": 1,
"yearweek": 1,
"year": 1,
"weekday": 1,
"dayofweek": 1,
"day": 1,
"hour": 1,
"minute": 1,
"second": 1,
"time_to_sec": 1,
"microsecond": 1,
"unix_timestamp": 1,
"from_days": 1,
"extract": 1,
"abs": 1,
"ceiling": 1,
"ceil": 1,
"datediff": 1,
"floor": 1,
"mod": 1,
}
AllowedPartitionFuncMap stores functions which can be used in the partition expression. See Link: https://dev.mysql.com/doc/refman/8.0/en/partitioning-limitations-functions.html
var AllowedPartitionUnaryOpMap = map[tree.UnaryOp]string{ tree.UNARY_PLUS: "+", tree.UNARY_MINUS: "-", }
AllowedPartitionUnaryOpMap store the operators of Unary expression link ref:https://dev.mysql.com/doc/refman/8.0/en/partitioning-limitations.html
var ForceCastExpr = forceCastExpr
var (
GSColDefs = [3][]*plan.ColDef{}
)
var MakePlan2Float64ConstExprWithType = makePlan2Float64ConstExprWithType
var MakePlan2Int64ConstExprWithType = makePlan2Int64ConstExprWithType
var MakePlan2Int64VecExprWithType = makePlan2Int64VecExprWithType
var MakePlan2StringConstExprWithType = makePlan2StringConstExprWithType
var MakePlan2StringVecExprWithType = makePlan2StringVecExprWithType
var MakePlan2Type = makePlan2Type
var MakePlan2Uint64ConstExprWithType = makePlan2Uint64ConstExprWithType
var MakePlan2Vecf32ConstExprWithType = makePlan2Vecf32ConstExprWithType
var MakeTypeByPlan2Expr = makeTypeByPlan2Expr
var MakeTypeByPlan2Type = makeTypeByPlan2Type
var ( MetaColDefs = []*plan.ColDef{ { Name: catalog.MetaColNames[catalog.QUERY_ID_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.QUERY_ID_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.STATEMENT_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.STATEMENT_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.ACCOUNT_ID_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.ACCOUNT_ID_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.ROLE_ID_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.ROLE_ID_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.RESULT_PATH_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.RESULT_PATH_IDX].Oid), NotNullable: false, Width: 4, }, }, { Name: catalog.MetaColNames[catalog.CREATE_TIME_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.CREATE_TIME_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.RESULT_SIZE_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.RESULT_SIZE_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.TABLES_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.TABLES_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.USER_ID_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.USER_ID_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.EXPIRED_TIME_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.EXPIRED_TIME_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.COLUMN_MAP_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.COLUMN_MAP_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.SAVED_ROW_COUNT_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.SAVED_ROW_COUNT_IDX].Oid), NotNullable: false, }, }, { Name: catalog.MetaColNames[catalog.QUERY_ROW_COUNT_IDX], Typ: plan.Type{ Id: int32(catalog.MetaColTypes[catalog.QUERY_ROW_COUNT_IDX].Oid), NotNullable: false, }, }, } )
var MoCacheColName2Index = map[string]int32{
"node_type": 0,
"node_id": 1,
"type": 2,
"used": 3,
"free": 4,
"hit_ratio": 5,
}
var MoCacheColNames = []string{
"node_type",
"node_id",
"type",
"used",
"free",
"hit_ratio",
}
var MoCacheColTypes = []types.Type{ types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_uint64, 0, 0), types.New(types.T_uint64, 0, 0), types.New(types.T_float32, 0, 0), }
var MoConfigColName2Index = map[string]int32{
"node_type": 0,
"node_id": 1,
"name": 2,
"current_value": 3,
"default_value": 4,
"internal": 5,
}
var MoConfigColNames = []string{
"node_type",
"node_id",
"name",
"current_value",
"default_value",
"internal",
}
var MoConfigColTypes = []types.Type{ types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), }
var MoLocksColName2Index = map[string]int32{
"cn_id": 0,
"txn_id": 1,
"table_id": 2,
"lock_key": 3,
"lock_content": 4,
"lock_mode": 5,
"lock_status": 6,
"lock_wait": 7,
}
var MoLocksColNames = []string{
"cn_id",
"txn_id",
"table_id",
"lock_key",
"lock_content",
"lock_mode",
"lock_status",
"lock_wait",
}
var MoLocksColTypes = []types.Type{ types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), }
var MoTransactionsColName2Index = map[string]int32{
"cn_id": 0,
"txn_id": 1,
"create_ts": 2,
"snapshot_ts": 3,
"prepared_ts": 4,
"commit_ts": 5,
"txn_mode": 6,
"isolation": 7,
"user_txn": 8,
"txn_status": 9,
"table_id": 10,
"lock_key": 11,
"lock_content": 12,
"lock_mode": 13,
}
var MoTransactionsColNames = []string{
"cn_id",
"txn_id",
"create_ts",
"snapshot_ts",
"prepared_ts",
"commit_ts",
"txn_mode",
"isolation",
"user_txn",
"txn_status",
"table_id",
"lock_key",
"lock_content",
"lock_mode",
}
var MoTransactionsColTypes = []types.Type{ types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), types.New(types.T_varchar, types.MaxVarcharLen, 0), }
var (
STATEMENT_ACCOUNT = "account"
)
var Sequence_cols_name = []string{"last_seq_num", "min_value", "max_value", "start_value", "increment_value", "cycle", "is_called"}
var SessionsColTypes []types.Type
Functions ¶
func AddColumn ¶ added in v1.0.0
func AddColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterAddCol, alterCtx *AlterTableContext) error
AddColumn will add a new column to the table.
func AddPrimaryKey ¶ added in v1.0.0
func AddPrimaryKey(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.PrimaryKeyIndex, alterCtx *AlterTableContext) error
AddPrimaryKey will add a new column to the table.
func AddTablePartitions ¶ added in v1.2.0
func AddTablePartitions(ctx CompilerContext, alterTable *plan.AlterTable, spec *tree.AlterPartitionAddPartitionClause) (*plan.AlterTableAddPartition, error)
AddTablePartitions will add a new partition to the table.
func AlterColumn ¶ added in v1.0.0
func AlterColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterTableAlterColumnClause, alterCtx *AlterTableContext) error
AlterColumn ALTER ... SET DEFAULT or ALTER ... DROP DEFAULT specify a new default value for a column or remove the old default value, respectively. If the old default is removed and the column can be NULL, the new default is NULL. If the column cannot be NULL, MySQL assigns a default value
func AssignAuxIdForExpr ¶ added in v0.8.0
func BindFuncExprImplByPlanExpr ¶ added in v0.8.0
func BuildVectorsByData ¶ added in v0.7.0
func ByteSliceToUint64 ¶ added in v1.0.0
convert first 8 bytes to uint64, slice might be less than 8 bytes
func ChangeColumn ¶ added in v1.0.0
func ChangeColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterTableChangeColumnClause, alterCtx *AlterTableContext) error
ChangeColumn Can rename a column and change its definition, or both. Has more capability than MODIFY or RENAME COLUMN, but at the expense of convenience for some operations. CHANGE requires naming the column twice if not renaming it, and requires respecifying the column definition if only renaming it. With FIRST or AFTER, can reorder columns.
func CheckColumnNameValid ¶ added in v1.0.0
Check if the column name is valid and conflicts with internal hidden columns
func CheckModifyColumnForeignkeyConstraint ¶ added in v1.0.0
func CheckModifyColumnForeignkeyConstraint(ctx CompilerContext, tbInfo *TableDef, originalCol, newCol *ColDef) error
CheckModifyColumnForeignkeyConstraint check for table column foreign key dependencies, including the foreign keys of the table itself and being dependent on foreign keys of other tables
func ConstandFoldList ¶ added in v1.2.0
func ConstantFold ¶ added in v0.6.0
func ConstructCreateTableSQL ¶ added in v1.2.1
func ConstructCreateTableSQL(tableObjRef *plan.ObjectRef, tableDef *plan.TableDef, snapshot Snapshot, ctx CompilerContext) (string, error)
ConstructCreateTableSQL used to build CREATE Table statement
func CreateIndexDef ¶ added in v1.1.0
func DeepCopyAnalyzeInfo ¶ added in v0.7.0
func DeepCopyAnalyzeInfo(analyzeinfo *plan.AnalyzeInfo) *plan.AnalyzeInfo
func DeepCopyClusterTable ¶ added in v0.7.0
func DeepCopyClusterTable(cluster *plan.ClusterTable) *plan.ClusterTable
func DeepCopyDataDefinition ¶ added in v0.6.0
func DeepCopyDataDefinition(old *plan.DataDefinition) *plan.DataDefinition
func DeepCopyDeleteCtx ¶ added in v0.7.0
func DeepCopyIndexDef ¶ added in v0.7.0
func DeepCopyIndexOption ¶ added in v1.1.0
func DeepCopyIndexOption(indexOption *plan.IndexOption) *plan.IndexOption
func DeepCopyInsertCtx ¶ added in v0.7.0
func DeepCopyLockTarget ¶ added in v0.8.0
func DeepCopyLockTarget(target *plan.LockTarget) *plan.LockTarget
func DeepCopyNumberList ¶ added in v0.8.0
func DeepCopyNumberList[T constraints.Integer](src []T) []T
func DeepCopyObjectRef ¶ added in v0.7.0
func DeepCopyOnDupliateKeyCtx ¶ added in v0.8.0
func DeepCopyOnDupliateKeyCtx(ctx *plan.OnDuplicateKeyCtx) *plan.OnDuplicateKeyCtx
func DeepCopyOrderBy ¶ added in v0.6.0
func DeepCopyOrderBy(orderBy *plan.OrderBySpec) *plan.OrderBySpec
func DeepCopyPartitionPrune ¶ added in v1.0.0
func DeepCopyPartitionPrune(partitionPrune *plan.PartitionPrune) *plan.PartitionPrune
func DeepCopyPreDeleteCtx ¶ added in v0.8.0
func DeepCopyPreDeleteCtx(ctx *plan.PreDeleteCtx) *plan.PreDeleteCtx
func DeepCopyPreInsertCtx ¶ added in v0.8.0
func DeepCopyPreInsertCtx(ctx *plan.PreInsertCtx) *plan.PreInsertCtx
func DeepCopyPreInsertUkCtx ¶ added in v0.8.0
func DeepCopyPreInsertUkCtx(ctx *plan.PreInsertUkCtx) *plan.PreInsertUkCtx
func DeepCopyPrimaryKeyDef ¶ added in v0.7.0
func DeepCopyPrimaryKeyDef(pkeyDef *plan.PrimaryKeyDef) *plan.PrimaryKeyDef
func DeepCopyReplaceCtx ¶ added in v1.2.1
func DeepCopyReplaceCtx(oldCtx *plan.ReplaceCtx) *plan.ReplaceCtx
func DeepCopySampleFuncSpec ¶ added in v1.1.0
func DeepCopySampleFuncSpec(source *plan.SampleFuncSpec) *plan.SampleFuncSpec
func DeepCopySliceInt64 ¶ added in v1.1.0
func DeepCopyStringList ¶ added in v0.8.0
func DeepCopyTableDef ¶ added in v0.6.0
func DeepCopyTableDefList ¶ added in v0.8.0
func DefaultHugeStats ¶ added in v0.8.0
func DefaultMinimalStats ¶ added in v1.1.0
func DefaultStats ¶ added in v0.7.0
func DefaultValueIsNull ¶ added in v1.0.0
func DropColumn ¶ added in v1.0.0
func DropColumn(ctx CompilerContext, alterPlan *plan.AlterTable, colName string, alterCtx *AlterTableContext) error
AddColumn will add a new column to the table.
func DropPrimaryKey ¶ added in v1.0.0
func DropPrimaryKey(ctx CompilerContext, alterPlan *plan.AlterTable, alterCtx *AlterTableContext) error
func EscapeFormat ¶ added in v1.2.1
EscapeFormat output escape character with backslash.
func EvalFilterExpr ¶ added in v0.7.0
func EvalPlanExpr ¶ added in v0.7.0
func ExprIsZonemappable ¶ added in v1.1.1
func ExtractToDateReturnType ¶ added in v0.8.0
func FormatColType ¶ added in v1.2.1
FormatColType Get the formatted description of the column type.
func FormatExpr ¶ added in v0.8.0
func FormatExprs ¶ added in v1.2.0
func GenConstraintName ¶ added in v1.1.2
func GenConstraintName() string
GenConstraintName yields uuid for the constraint name
func GetBindings ¶ added in v0.5.0
func GetCenterValueForZMSigned ¶ added in v1.1.0
func GetCenterValueForZMUnsigned ¶ added in v1.1.0
func GetColumnMapByExpr ¶ added in v0.8.0
func GetColumnMapByExprs ¶ added in v0.8.0
func GetColumnsByExpr ¶ added in v0.7.0
func GetFkReferredTo ¶ added in v1.1.2
func GetFkReferredTo(ctx CompilerContext, db, table string) (map[FkReferKey]map[string][]*FkReferDef, error)
GetFkReferredTo returns the foreign key relationships that refer to the table
func GetForETLWithType ¶ added in v0.7.0
func GetForETLWithType(param *tree.ExternParam, prefix string) (res fileservice.ETLFileService, readPath string, err error)
func GetFunctionArgTypeStrFromAst ¶ added in v1.1.0
func GetFunctionArgTypeStrFromAst(arg tree.FunctionArg) (string, error)
GetFunctionArgTypeStrFromAst function arg type do not have scale and width, it depends on the data that it process
func GetFunctionTypeStrFromAst ¶ added in v1.1.0
func GetFunctionTypeStrFromAst(typRef tree.ResolvableTypeReference) (string, error)
func GetInFilterCardLimit ¶ added in v1.1.1
func GetInFilterCardLimit() int32
func GetInFilterCardLimitOnPK ¶ added in v1.2.0
func GetRangeShuffleIndexForZM ¶ added in v0.8.0
func GetRangeShuffleIndexForZMSignedSlice ¶ added in v1.1.0
func GetRangeShuffleIndexForZMUnsignedSlice ¶ added in v1.1.0
func GetRangeShuffleIndexSignedMinMax ¶ added in v1.1.0
func GetRangeShuffleIndexSignedSlice ¶ added in v1.1.0
func GetRangeShuffleIndexUnsignedMinMax ¶ added in v1.1.0
func GetRangeShuffleIndexUnsignedSlice ¶ added in v1.1.0
func GetRowSizeFromTableDef ¶ added in v1.2.0
func GetShuffleDop ¶ added in v0.8.0
func GetSortOrderByName ¶ added in v1.2.0
todo: remove this in the future
func GetSqlForFkReferredTo ¶ added in v1.1.2
GetSqlForFkReferredTo returns the query that retrieves the fk relationships that refer to the table
func GetUniqueColAndIdxFromTableDef ¶ added in v0.8.0
GetUniqueColAndIdxFromTableDef if get table: t1(a int primary key, b int, c int, d int, unique key(b,c)); return : []map[string]int { {'a'=1}, {'b'=2,'c'=3} }
func GetVarValue ¶ added in v0.8.0
func HasFkSelfReferOnly ¶ added in v1.1.2
HasFkSelfReferOnly checks the foreign key referencing itself only. If there is no children tables, it also returns true the tbleId 0 is special. it always denotes the table itself.
func InitInfileParam ¶ added in v0.7.0
func InitInfileParam(param *tree.ExternParam) error
func InitNullMap ¶ added in v0.6.0
func InitNullMap(param *tree.ExternParam, ctx CompilerContext) error
func InitS3Param ¶ added in v0.7.0
func InitS3Param(param *tree.ExternParam) error
func InternalTable ¶ added in v1.2.0
func IsEqualFunc ¶ added in v1.1.0
func IsEquiJoin2 ¶ added in v0.8.0
IsEquiJoin2 Judge whether a join node is equi-join (after column remapping) Can only be used after optimizer!!!
func IsFalseExpr ¶ added in v1.2.0
func IsFkBannedDatabase ¶ added in v1.1.2
IsFkBannedDatabase denotes the database should not have any foreign keys
func IsFkSelfRefer ¶ added in v1.1.2
IsFkSelfRefer checks the foreign key referencing itself
func IsForeignKeyChecksEnabled ¶ added in v1.1.2
func IsForeignKeyChecksEnabled(ctx CompilerContext) (bool, error)
IsForeignKeyChecksEnabled returns the system variable foreign_key_checks is true or false
func IsSnapshotValid ¶ added in v1.2.0
func MakePlan2Decimal128ExprWithType ¶ added in v0.8.0
func MakePlan2Decimal128ExprWithType(v types.Decimal128, typ *Type) *plan.Expr
func MakePlan2Decimal64ExprWithType ¶ added in v0.8.0
func MakePlan2NullTextConstExprWithType ¶ added in v0.7.0
func MakeRuntimeFilter ¶ added in v1.2.0
func ModifyColumn ¶ added in v1.0.0
func ModifyColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterTableModifyColumnClause, alterCtx *AlterTableContext) error
ModifyColumn Can change a column definition but not its name. More convenient than CHANGE to change a column definition without renaming it. With FIRST or AFTER, can reorder columns.
func NewShuffleRange ¶ added in v1.1.0
func NewShuffleRange(isString bool) *pb.ShuffleRange
func NewStatsInfo ¶ added in v1.2.0
func OrderByColumn ¶ added in v1.0.0
func OrderByColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterTableOrderByColumnClause, alterCtx *AlterTableContext) error
OrderByColumn Currently, Mo only performs semantic checks on alter table order by and does not implement the function of changing the physical storage order of data in the table
func PartitionFuncConstantFold ¶ added in v1.1.0
func PrintStats ¶ added in v0.8.0
func ReCalcNodeStats ¶ added in v0.7.0
func ReCalcNodeStats(nodeID int32, builder *QueryBuilder, recursive bool, leafNode bool, needResetHashMapStats bool)
func ReCalcQueryStats ¶ added in v1.0.0
func ReCalcQueryStats(builder *QueryBuilder, query *plan.Query)
func ReadDir ¶ added in v0.7.0
func ReadDir(param *tree.ExternParam) (fileList []string, fileSize []int64, err error)
ReadDir support "etl:" and "/..." absolute path, NOT support relative path.
func RenameColumn ¶ added in v1.0.0
func RenameColumn(ctx CompilerContext, alterPlan *plan.AlterTable, spec *tree.AlterTableRenameColumnClause, alterCtx *AlterTableContext) error
RenameColumn Can change a column name but not its definition. More convenient than CHANGE to rename a column without changing its definition.
func ResetAuxIdForExpr ¶ added in v0.8.0
func ResetPreparePlan ¶ added in v1.1.0
func ResolveAlterTableAlgorithm ¶ added in v1.0.0
func ResolveAlterTableAlgorithm(ctx context.Context, validAlterSpecs []tree.AlterTableOption) (algorithm plan.AlterTable_AlgorithmType)
func ShuffleRangeReEvalSigned ¶ added in v1.1.0
func ShuffleRangeReEvalUnsigned ¶ added in v1.1.0
func SimpleCharHashToRange ¶ added in v0.8.0
func SimpleInt64HashToRange ¶ added in v0.8.0
func StatFile ¶ added in v1.1.1
func StatFile(param *tree.ExternParam) error
func UpdateStatsInfo ¶ added in v1.2.0
func UpdateStatsInfo(info *InfoFromZoneMap, tableDef *plan.TableDef, s *pb.StatsInfo)
func VarlenaToUint64 ¶ added in v1.0.0
convert first 8 bytes to uint64
func VarlenaToUint64Inline ¶ added in v1.0.0
convert first 8 bytes to uint64. vec.area must be nil if varlena length less than 8 bytes, should have filled zero in varlena
Types ¶
type AlterTableContext ¶ added in v1.0.0
type AlterTableContext struct { UpdateSqls []string // contains filtered or unexported fields }
type BaseOptimizer ¶ added in v0.5.0
type BaseOptimizer struct {
// contains filtered or unexported fields
}
BaseOptimizer is base optimizer, capable of handling only a few simple rules
func NewBaseOptimizer ¶ added in v0.5.0
func NewBaseOptimizer(ctx CompilerContext) *BaseOptimizer
func NewPrepareOptimizer ¶ added in v0.7.0
func NewPrepareOptimizer(ctx CompilerContext) *BaseOptimizer
func (*BaseOptimizer) CurrentContext ¶ added in v0.5.0
func (opt *BaseOptimizer) CurrentContext() CompilerContext
type BindContext ¶ added in v0.5.0
type BindContext struct {
// contains filtered or unexported fields
}
func NewBindContext ¶ added in v0.5.0
func NewBindContext(builder *QueryBuilder, parent *BindContext) *BindContext
type Binder ¶ added in v0.5.0
type Binder interface { BindExpr(tree.Expr, int32, bool) (*plan.Expr, error) BindColRef(*tree.UnresolvedName, int32, bool) (*plan.Expr, error) BindAggFunc(string, *tree.FuncExpr, int32, bool) (*plan.Expr, error) BindWinFunc(string, *tree.FuncExpr, int32, bool) (*plan.Expr, error) BindSubquery(*tree.Subquery, bool) (*plan.Expr, error) BindTimeWindowFunc(string, *tree.FuncExpr, int32, bool) (*plan.Expr, error) GetContext() context.Context }
type Binding ¶ added in v0.5.0
type Binding struct {
// contains filtered or unexported fields
}
func NewBinding ¶ added in v0.5.0
func (*Binding) FindColumn ¶ added in v0.5.0
type BindingTreeNode ¶ added in v0.5.0
type BindingTreeNode struct {
// contains filtered or unexported fields
}
type ClusterByDef ¶ added in v0.7.0
type ClusterByDef = plan.ClusterByDef
type ClusterTable ¶ added in v0.7.0
type ClusterTable = plan.ClusterTable
type ColDef ¶ added in v0.5.0
func FindColumn ¶ added in v0.8.0
FindColumn finds column in cols by name.
func FindColumnByColId ¶ added in v1.0.0
FindColumn finds column in cols by colId
func GetColDefFromTable ¶ added in v1.0.0
GetColDefFromTable Find the target column definition from the predefined table columns and return its deep copy
func GetResultColumnsFromPlan ¶ added in v0.5.0
GetResultColumnsFromPlan
func MakeHiddenColDefByName ¶ added in v0.8.0
used for Compound primary key column name && clusterby column name
func MakeRowIdColDef ¶ added in v0.8.0
func MakeRowIdColDef() *ColDef
type ColRefRemapping ¶ added in v0.5.0
type ColRefRemapping struct {
// contains filtered or unexported fields
}
func (*ColRefRemapping) String ¶ added in v1.2.2
func (m *ColRefRemapping) String() string
type CompilerContext ¶ added in v0.5.0
type CompilerContext interface { // Default database/schema in context DefaultDatabase() string // check if database exist DatabaseExists(name string, snapshot Snapshot) bool // get table definition by database/schema Resolve(schemaName string, tableName string, snapshot Snapshot) (*ObjectRef, *TableDef) // get table definition by table id ResolveById(tableId uint64, snapshot Snapshot) (*ObjectRef, *TableDef) // get the value of variable ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error) // get the list of the account id ResolveAccountIds(accountNames []string) ([]uint32, error) // get the relevant information of udf ResolveUdf(name string, args []*Expr) (*function.Udf, error) // get the definition of primary key GetPrimaryKeyDef(dbName string, tableName string, snapshot Snapshot) []*ColDef // get needed info for stats by table Stats(obj *ObjectRef, snapshot Snapshot) (*pb.StatsInfo, error) // get origin sql string of the root GetRootSql() string // get username of current session GetUserName() string GetAccountId() (uint32, error) // GetContext get raw context.Context GetContext() context.Context // GetDatabaseId Get database id GetDatabaseId(dbName string, snapshot Snapshot) (uint64, error) GetProcess() *process.Process GetQueryResultMeta(uuid string) ([]*ColDef, string, error) SetBuildingAlterView(yesOrNo bool, dbName, viewName string) // is building the alter view or not // return: yes or no, dbName, viewName GetBuildingAlterView() (bool, string, string) GetStatsCache() *StatsCache GetSubscriptionMeta(dbName string, snapshot Snapshot) (*SubscriptionMeta, error) CheckSubscriptionValid(subName, accName string, pubName string) error SetQueryingSubscription(meta *SubscriptionMeta) GetQueryingSubscription() *SubscriptionMeta IsPublishing(dbName string) (bool, error) ResolveSubscriptionTableById(tableId uint64, pubmeta *SubscriptionMeta) (*ObjectRef, *TableDef) ResolveSnapshotWithSnapshotName(snapshotName string) (*Snapshot, error) CheckTimeStampValid(ts int64) (bool, error) //ReplacePlan replaces the plan of the EXECUTE by the plan generated by the PREPARE. //return // the plan generated by the PREPARE // the statement generated by the PREPARE ReplacePlan(execPlan *plan.Execute) (*plan.Plan, tree.Statement, error) GetSnapshot() *Snapshot SetSnapshot(snapshot *Snapshot) GetViews() []string SetViews(views []string) GetLowerCaseTableNames() int64 }
type ConstantFoldRule ¶ added in v0.7.0
type ConstantFoldRule struct {
// contains filtered or unexported fields
}
func NewConstantFoldRule ¶ added in v0.7.0
func NewConstantFoldRule(compCtx CompilerContext) *ConstantFoldRule
func (*ConstantFoldRule) ApplyNode ¶ added in v0.7.0
func (r *ConstantFoldRule) ApplyNode(node *Node) error
func (*ConstantFoldRule) IsApplyExpr ¶ added in v0.7.0
func (r *ConstantFoldRule) IsApplyExpr() bool
func (*ConstantFoldRule) MatchNode ¶ added in v0.7.0
func (r *ConstantFoldRule) MatchNode(node *Node) bool
type DefaultBinder ¶ added in v0.6.0
type DefaultBinder struct {
// contains filtered or unexported fields
}
func NewDefaultBinder ¶ added in v0.6.0
func NewDefaultBinder(sysCtx context.Context, builder *QueryBuilder, ctx *BindContext, typ Type, cols []string) *DefaultBinder
func (*DefaultBinder) BindAggFunc ¶ added in v0.6.0
func (*DefaultBinder) BindColRef ¶ added in v0.6.0
func (b *DefaultBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*DefaultBinder) BindSubquery ¶ added in v0.6.0
func (*DefaultBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*DefaultBinder) BindWinFunc ¶ added in v0.6.0
func (*DefaultBinder) GetContext ¶ added in v0.7.0
type ExecInfo ¶ added in v0.6.0
func GetExecTypeFromPlan ¶ added in v0.6.0
GetExecType get executor will execute base AP or TP
type ExpandAliasMode ¶ added in v1.0.0
type ExpandAliasMode int8
const ( NoAlias ExpandAliasMode = iota AliasBeforeColumn AliasAfterColumn )
type Expr ¶ added in v0.5.0
func DeepCopyExpr ¶ added in v0.5.0
func DeepCopyExprList ¶ added in v0.6.0
func DeepProcessExprForGroupConcat ¶ added in v1.1.0
func DeepProcessExprForGroupConcat(expr *Expr, ctx *BindContext) *Expr
func GenUniqueColCheckExpr ¶ added in v0.8.0
func GenUniqueColCheckExpr(ctx context.Context, tableDef *TableDef, uniqueCols []map[string]int, colCount int) ([]*Expr, error)
GenUniqueColCheckExpr like GenUniqueColJoinExpr. but use for on duplicate key clause to check conflict if get table: t1(a int primary key, b int, c int, d int, unique key(b,c)); we get batch like [1,2,3,4, origin_a, origin_b, origin_c, origin_d, row_id ....]。 we get expr like: []*Expr{ 1=origin_a , (2 = origin_b and 3 = origin_c) }
func GenUniqueColJoinExpr ¶ added in v0.8.0
func GenUniqueColJoinExpr(ctx context.Context, tableDef *TableDef, uniqueCols []map[string]int, leftTag int32, rightTag int32) (*Expr, error)
GenUniqueColJoinExpr if get table: t1(a int primary key, b int, c int, d int, unique key(b,c)); uniqueCols is: []map[string]int { {'a'=1}, {'b'=2,'c'=3} } we will get expr like: 'leftTag.a = rightTag.a or (leftTag.b = rightTag.b and leftTag.c = rightTag. c)
func MakeFalseExpr ¶ added in v1.2.0
func MakeFalseExpr() *Expr
func MakeInExpr ¶ added in v1.2.0
func MakeIntervalExpr ¶ added in v1.2.0
func SplitCNFItems ¶ added in v1.1.0
SplitCNFItems splits CNF items. CNF means conjunctive normal form, such as: "a and b and c".
func SplitDNFItems ¶ added in v1.1.0
SplitDNFItems splits DNF items. DNF means disjunctive normal form, such as: "a or b or c".
type FkData ¶ added in v1.1.2
type FkData struct { // fk reference to itself IsSelfRefer bool // the database that the fk refers to ParentDbName string // the table that the fk refers to ParentTableName string //the columns in foreign key Cols *plan.FkColName // the columns referred ColsReferred *plan.FkColName //fk definition Def *plan.ForeignKeyDef //the column typs in foreign key ColTyps map[int]*plan.Type // update foreign keys relations UpdateSql string // forward reference ForwardRefer bool }
type FkReferDef ¶ added in v1.1.2
type FkReferDef struct { Db string //fk database name Tbl string //fk table name Name string //fk constraint name Col string //fk column name ReferCol string //referenced column name OnDelete string //on delete action OnUpdate string //on update action }
FkReferDef holds the definition & details of the foreign key
func (FkReferDef) String ¶ added in v1.1.2
func (fk FkReferDef) String() string
type FkReferKey ¶ added in v1.1.2
FkReferKey holds the database and table name of the foreign key
type ForeignKeyDef ¶ added in v0.7.0
type ForeignKeyDef = plan.ForeignKeyDef
func DeepCopyFkey ¶ added in v0.8.0
func DeepCopyFkey(fkey *ForeignKeyDef) *ForeignKeyDef
type GetParamRule ¶ added in v0.6.0
type GetParamRule struct {
// contains filtered or unexported fields
}
func NewGetParamRule ¶ added in v0.5.1
func NewGetParamRule() *GetParamRule
func (*GetParamRule) ApplyNode ¶ added in v0.6.0
func (rule *GetParamRule) ApplyNode(node *Node) error
func (*GetParamRule) IsApplyExpr ¶ added in v0.6.0
func (rule *GetParamRule) IsApplyExpr() bool
func (*GetParamRule) MatchNode ¶ added in v0.6.0
func (rule *GetParamRule) MatchNode(node *Node) bool
func (*GetParamRule) SetParamOrder ¶ added in v0.6.0
func (rule *GetParamRule) SetParamOrder()
type GroupBinder ¶ added in v0.5.0
type GroupBinder struct {
// contains filtered or unexported fields
}
func NewGroupBinder ¶ added in v0.5.0
func NewGroupBinder(builder *QueryBuilder, ctx *BindContext, selectList tree.SelectExprs) *GroupBinder
func (*GroupBinder) BindAggFunc ¶ added in v0.5.0
func (*GroupBinder) BindColRef ¶ added in v0.5.0
func (b *GroupBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*GroupBinder) BindSubquery ¶ added in v0.5.0
func (*GroupBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*GroupBinder) BindWinFunc ¶ added in v0.5.0
func (*GroupBinder) GetContext ¶ added in v0.7.0
type HavingBinder ¶ added in v0.5.0
type HavingBinder struct {
// contains filtered or unexported fields
}
func NewHavingBinder ¶ added in v0.5.0
func NewHavingBinder(builder *QueryBuilder, ctx *BindContext) *HavingBinder
func (*HavingBinder) BindAggFunc ¶ added in v0.5.0
func (*HavingBinder) BindColRef ¶ added in v0.5.0
func (b *HavingBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*HavingBinder) BindSubquery ¶ added in v0.5.0
func (*HavingBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*HavingBinder) BindWinFunc ¶ added in v0.5.0
func (*HavingBinder) GetContext ¶ added in v0.7.0
type InfoFromZoneMap ¶ added in v0.8.0
type InfoFromZoneMap struct { ColumnZMs []objectio.ZoneMap DataTypes []types.Type ColumnNDVs []float64 NullCnts []int64 ShuffleRanges []*pb.ShuffleRange ColumnSize []int64 BlockNumber int64 AccurateObjectNumber int64 ApproxObjectNumber int64 TableCnt float64 }
func NewInfoFromZoneMap ¶ added in v0.8.0
func NewInfoFromZoneMap(lenCols int) *InfoFromZoneMap
type KeyHashPartitionPruner ¶ added in v1.1.0
type KeyHashPartitionPruner struct {
// contains filtered or unexported fields
}
KEY and HASH Partition Pruner
type LimitBinder ¶ added in v0.5.0
type LimitBinder struct {
// contains filtered or unexported fields
}
func NewLimitBinder ¶ added in v0.5.0
func NewLimitBinder(builder *QueryBuilder, ctx *BindContext) *LimitBinder
func (*LimitBinder) BindAggFunc ¶ added in v0.5.0
func (*LimitBinder) BindColRef ¶ added in v0.5.0
func (b *LimitBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*LimitBinder) BindSubquery ¶ added in v0.5.0
func (*LimitBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*LimitBinder) BindWinFunc ¶ added in v0.5.0
func (*LimitBinder) GetContext ¶ added in v0.7.0
type MoCacheColType ¶ added in v1.1.0
type MoCacheColType int32
type MoConfigColType ¶ added in v1.1.0
type MoConfigColType int32
type MoLocksColType ¶ added in v1.1.0
type MoLocksColType int32
type MoTransactionsColType ¶ added in v1.1.0
type MoTransactionsColType int32
type MockBinder ¶ added in v0.7.0
type MockBinder struct {
// contains filtered or unexported fields
}
MockBinder is a mock of Binder interface.
func NewMockBinder ¶ added in v0.7.0
func NewMockBinder(ctrl *gomock.Controller) *MockBinder
NewMockBinder creates a new mock instance.
func (*MockBinder) BindAggFunc ¶ added in v0.7.0
func (m *MockBinder) BindAggFunc(arg0 string, arg1 *tree.FuncExpr, arg2 int32, arg3 bool) (*plan.Expr, error)
BindAggFunc mocks base method.
func (*MockBinder) BindColRef ¶ added in v0.7.0
func (m *MockBinder) BindColRef(arg0 *tree.UnresolvedName, arg1 int32, arg2 bool) (*plan.Expr, error)
BindColRef mocks base method.
func (*MockBinder) BindSubquery ¶ added in v0.7.0
BindSubquery mocks base method.
func (*MockBinder) BindTimeWindowFunc ¶ added in v1.1.1
func (m *MockBinder) BindTimeWindowFunc(arg0 string, arg1 *tree.FuncExpr, arg2 int32, arg3 bool) (*plan.Expr, error)
BindTimeWindowFunc mocks base method.
func (*MockBinder) BindWinFunc ¶ added in v0.7.0
func (m *MockBinder) BindWinFunc(arg0 string, arg1 *tree.FuncExpr, arg2 int32, arg3 bool) (*plan.Expr, error)
BindWinFunc mocks base method.
func (*MockBinder) EXPECT ¶ added in v0.7.0
func (m *MockBinder) EXPECT() *MockBinderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBinder) GetContext ¶ added in v0.7.0
func (m *MockBinder) GetContext() context.Context
GetContext mocks base method.
type MockBinderMockRecorder ¶ added in v0.7.0
type MockBinderMockRecorder struct {
// contains filtered or unexported fields
}
MockBinderMockRecorder is the mock recorder for MockBinder.
func (*MockBinderMockRecorder) BindAggFunc ¶ added in v0.7.0
func (mr *MockBinderMockRecorder) BindAggFunc(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
BindAggFunc indicates an expected call of BindAggFunc.
func (*MockBinderMockRecorder) BindColRef ¶ added in v0.7.0
func (mr *MockBinderMockRecorder) BindColRef(arg0, arg1, arg2 interface{}) *gomock.Call
BindColRef indicates an expected call of BindColRef.
func (*MockBinderMockRecorder) BindExpr ¶ added in v0.7.0
func (mr *MockBinderMockRecorder) BindExpr(arg0, arg1, arg2 interface{}) *gomock.Call
BindExpr indicates an expected call of BindExpr.
func (*MockBinderMockRecorder) BindSubquery ¶ added in v0.7.0
func (mr *MockBinderMockRecorder) BindSubquery(arg0, arg1 interface{}) *gomock.Call
BindSubquery indicates an expected call of BindSubquery.
func (*MockBinderMockRecorder) BindTimeWindowFunc ¶ added in v1.1.1
func (mr *MockBinderMockRecorder) BindTimeWindowFunc(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
BindTimeWindowFunc indicates an expected call of BindTimeWindowFunc.
func (*MockBinderMockRecorder) BindWinFunc ¶ added in v0.7.0
func (mr *MockBinderMockRecorder) BindWinFunc(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
BindWinFunc indicates an expected call of BindWinFunc.
func (*MockBinderMockRecorder) GetContext ¶ added in v0.7.0
func (mr *MockBinderMockRecorder) GetContext() *gomock.Call
GetContext indicates an expected call of GetContext.
type MockCompilerContext ¶ added in v0.5.0
type MockCompilerContext struct {
// contains filtered or unexported fields
}
func NewEmptyCompilerContext ¶ added in v0.5.0
func NewEmptyCompilerContext() *MockCompilerContext
NewEmptyCompilerContext for test create/drop statement
func NewMockCompilerContext ¶ added in v0.5.0
func NewMockCompilerContext(isDml bool) *MockCompilerContext
func (*MockCompilerContext) CheckSubscriptionValid ¶ added in v0.8.0
func (m *MockCompilerContext) CheckSubscriptionValid(subName, accName string, pubName string) error
func (*MockCompilerContext) CheckTimeStampValid ¶ added in v1.2.0
func (m *MockCompilerContext) CheckTimeStampValid(ts int64) (bool, error)
func (*MockCompilerContext) DatabaseExists ¶ added in v0.5.0
func (m *MockCompilerContext) DatabaseExists(name string, snapshot Snapshot) bool
func (*MockCompilerContext) DefaultDatabase ¶ added in v0.5.0
func (m *MockCompilerContext) DefaultDatabase() string
func (*MockCompilerContext) GetAccountId ¶ added in v0.6.0
func (m *MockCompilerContext) GetAccountId() (uint32, error)
func (*MockCompilerContext) GetBuildingAlterView ¶ added in v0.7.0
func (m *MockCompilerContext) GetBuildingAlterView() (bool, string, string)
func (*MockCompilerContext) GetContext ¶ added in v0.7.0
func (m *MockCompilerContext) GetContext() context.Context
func (*MockCompilerContext) GetDatabaseId ¶ added in v0.8.0
func (m *MockCompilerContext) GetDatabaseId(dbName string, snapshot Snapshot) (uint64, error)
func (*MockCompilerContext) GetLowerCaseTableNames ¶ added in v1.2.1
func (m *MockCompilerContext) GetLowerCaseTableNames() int64
func (*MockCompilerContext) GetPrimaryKeyDef ¶ added in v0.5.0
func (m *MockCompilerContext) GetPrimaryKeyDef(dbName string, tableName string, snapshot Snapshot) []*ColDef
func (*MockCompilerContext) GetProcess ¶ added in v0.7.0
func (m *MockCompilerContext) GetProcess() *process.Process
func (*MockCompilerContext) GetQueryResultMeta ¶ added in v0.7.0
func (m *MockCompilerContext) GetQueryResultMeta(uuid string) ([]*ColDef, string, error)
func (*MockCompilerContext) GetQueryingSubscription ¶ added in v0.8.0
func (m *MockCompilerContext) GetQueryingSubscription() *SubscriptionMeta
func (*MockCompilerContext) GetRootSql ¶ added in v0.6.0
func (m *MockCompilerContext) GetRootSql() string
func (*MockCompilerContext) GetSnapshot ¶ added in v1.2.0
func (m *MockCompilerContext) GetSnapshot() *Snapshot
func (*MockCompilerContext) GetStatsCache ¶ added in v0.8.0
func (m *MockCompilerContext) GetStatsCache() *StatsCache
func (*MockCompilerContext) GetSubscriptionMeta ¶ added in v0.8.0
func (m *MockCompilerContext) GetSubscriptionMeta(dbName string, snapshot Snapshot) (*SubscriptionMeta, error)
func (*MockCompilerContext) GetUserName ¶ added in v0.6.0
func (m *MockCompilerContext) GetUserName() string
func (*MockCompilerContext) GetViews ¶ added in v1.2.0
func (m *MockCompilerContext) GetViews() []string
func (*MockCompilerContext) IsPublishing ¶ added in v0.8.0
func (m *MockCompilerContext) IsPublishing(dbName string) (bool, error)
func (*MockCompilerContext) ReplacePlan ¶ added in v1.2.0
func (*MockCompilerContext) ResolveAccountIds ¶ added in v0.7.0
func (m *MockCompilerContext) ResolveAccountIds(accountNames []string) ([]uint32, error)
func (*MockCompilerContext) ResolveById ¶ added in v0.7.0
func (m *MockCompilerContext) ResolveById(tableId uint64, snapshot Snapshot) (*ObjectRef, *TableDef)
func (*MockCompilerContext) ResolveSnapshotWithSnapshotName ¶ added in v1.2.0
func (m *MockCompilerContext) ResolveSnapshotWithSnapshotName(snapshotName string) (*Snapshot, error)
func (*MockCompilerContext) ResolveSubscriptionTableById ¶ added in v1.2.0
func (m *MockCompilerContext) ResolveSubscriptionTableById(tableId uint64, pubmeta *SubscriptionMeta) (*ObjectRef, *TableDef)
func (*MockCompilerContext) ResolveUdf ¶ added in v0.8.0
func (*MockCompilerContext) ResolveVariable ¶ added in v0.5.0
func (m *MockCompilerContext) ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error)
func (*MockCompilerContext) SetBuildingAlterView ¶ added in v0.7.0
func (m *MockCompilerContext) SetBuildingAlterView(yesOrNo bool, dbName, viewName string)
func (*MockCompilerContext) SetQueryingSubscription ¶ added in v0.8.0
func (m *MockCompilerContext) SetQueryingSubscription(*SubscriptionMeta)
func (*MockCompilerContext) SetSnapshot ¶ added in v1.2.0
func (m *MockCompilerContext) SetSnapshot(snapshot *Snapshot)
func (*MockCompilerContext) SetViews ¶ added in v1.2.0
func (m *MockCompilerContext) SetViews(views []string)
type MockCompilerContext2 ¶ added in v0.7.0
type MockCompilerContext2 struct {
// contains filtered or unexported fields
}
MockCompilerContext2 is a mock of CompilerContext interface.
func NewMockCompilerContext2 ¶ added in v0.7.0
func NewMockCompilerContext2(ctrl *gomock.Controller) *MockCompilerContext2
NewMockCompilerContext2 creates a new mock instance.
func (*MockCompilerContext2) CheckSubscriptionValid ¶ added in v0.8.0
func (m *MockCompilerContext2) CheckSubscriptionValid(subName, accName, pubName string) error
CheckSubscriptionValid mocks base method.
func (*MockCompilerContext2) CheckTimeStampValid ¶ added in v1.2.0
func (m *MockCompilerContext2) CheckTimeStampValid(ts int64) (bool, error)
CheckTimeStampValid mocks base method.
func (*MockCompilerContext2) DatabaseExists ¶ added in v0.7.0
func (m *MockCompilerContext2) DatabaseExists(name string, snapshot Snapshot) bool
DatabaseExists mocks base method.
func (*MockCompilerContext2) DefaultDatabase ¶ added in v0.7.0
func (m *MockCompilerContext2) DefaultDatabase() string
DefaultDatabase mocks base method.
func (*MockCompilerContext2) EXPECT ¶ added in v0.7.0
func (m *MockCompilerContext2) EXPECT() *MockCompilerContext2MockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCompilerContext2) GetAccountId ¶ added in v0.7.0
func (m *MockCompilerContext2) GetAccountId() (uint32, error)
GetAccountId mocks base method.
func (*MockCompilerContext2) GetBuildingAlterView ¶ added in v0.7.0
func (m *MockCompilerContext2) GetBuildingAlterView() (bool, string, string)
GetBuildingAlterView mocks base method.
func (*MockCompilerContext2) GetContext ¶ added in v0.7.0
func (m *MockCompilerContext2) GetContext() context.Context
GetContext mocks base method.
func (*MockCompilerContext2) GetDatabaseId ¶ added in v0.8.0
func (m *MockCompilerContext2) GetDatabaseId(dbName string, snapshot Snapshot) (uint64, error)
GetDatabaseId mocks base method.
func (*MockCompilerContext2) GetLowerCaseTableNames ¶ added in v1.2.1
func (m *MockCompilerContext2) GetLowerCaseTableNames() int64
GetLowerCaseTableNames mocks base method.
func (*MockCompilerContext2) GetPrimaryKeyDef ¶ added in v0.7.0
func (m *MockCompilerContext2) GetPrimaryKeyDef(dbName, tableName string, snapshot Snapshot) []*ColDef
GetPrimaryKeyDef mocks base method.
func (*MockCompilerContext2) GetProcess ¶ added in v0.7.0
func (m *MockCompilerContext2) GetProcess() *process.Process
GetProcess mocks base method.
func (*MockCompilerContext2) GetQueryResultMeta ¶ added in v0.7.0
func (m *MockCompilerContext2) GetQueryResultMeta(uuid string) ([]*ColDef, string, error)
GetQueryResultMeta mocks base method.
func (*MockCompilerContext2) GetQueryingSubscription ¶ added in v0.8.0
func (m *MockCompilerContext2) GetQueryingSubscription() *SubscriptionMeta
GetQueryingSubscription mocks base method.
func (*MockCompilerContext2) GetRootSql ¶ added in v0.7.0
func (m *MockCompilerContext2) GetRootSql() string
GetRootSql mocks base method.
func (*MockCompilerContext2) GetSnapshot ¶ added in v1.2.0
func (m *MockCompilerContext2) GetSnapshot() *Snapshot
GetSnapshot mocks base method.
func (*MockCompilerContext2) GetStatsCache ¶ added in v0.8.0
func (m *MockCompilerContext2) GetStatsCache() *StatsCache
GetStatsCache mocks base method.
func (*MockCompilerContext2) GetSubscriptionMeta ¶ added in v0.8.0
func (m *MockCompilerContext2) GetSubscriptionMeta(dbName string, snapshot Snapshot) (*SubscriptionMeta, error)
GetSubscriptionMeta mocks base method.
func (*MockCompilerContext2) GetUserName ¶ added in v0.7.0
func (m *MockCompilerContext2) GetUserName() string
GetUserName mocks base method.
func (*MockCompilerContext2) GetViews ¶ added in v1.2.0
func (m *MockCompilerContext2) GetViews() []string
GetViews mocks base method.
func (*MockCompilerContext2) IsPublishing ¶ added in v0.8.0
func (m *MockCompilerContext2) IsPublishing(dbName string) (bool, error)
IsPublishing mocks base method.
func (*MockCompilerContext2) ReplacePlan ¶ added in v1.2.0
func (m *MockCompilerContext2) ReplacePlan(execPlan *plan.Execute) (*plan.Plan, tree.Statement, error)
ReplacePlan mocks base method.
func (*MockCompilerContext2) Resolve ¶ added in v0.7.0
func (m *MockCompilerContext2) Resolve(schemaName, tableName string, snapshot Snapshot) (*ObjectRef, *TableDef)
Resolve mocks base method.
func (*MockCompilerContext2) ResolveAccountIds ¶ added in v0.7.0
func (m *MockCompilerContext2) ResolveAccountIds(accountNames []string) ([]uint32, error)
ResolveAccountIds mocks base method.
func (*MockCompilerContext2) ResolveById ¶ added in v0.7.0
func (m *MockCompilerContext2) ResolveById(tableId uint64, snapshot Snapshot) (*ObjectRef, *TableDef)
ResolveById mocks base method.
func (*MockCompilerContext2) ResolveSnapshotWithSnapshotName ¶ added in v1.2.0
func (m *MockCompilerContext2) ResolveSnapshotWithSnapshotName(snapshotName string) (*Snapshot, error)
ResolveSnapshotWithSnapshotName mocks base method.
func (*MockCompilerContext2) ResolveSubscriptionTableById ¶ added in v1.2.0
func (m *MockCompilerContext2) ResolveSubscriptionTableById(tableId uint64, pubmeta *SubscriptionMeta) (*ObjectRef, *TableDef)
ResolveSubscriptionTableById mocks base method.
func (*MockCompilerContext2) ResolveUdf ¶ added in v0.8.0
ResolveUdf mocks base method.
func (*MockCompilerContext2) ResolveVariable ¶ added in v0.7.0
func (m *MockCompilerContext2) ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error)
ResolveVariable mocks base method.
func (*MockCompilerContext2) SetBuildingAlterView ¶ added in v0.7.0
func (m *MockCompilerContext2) SetBuildingAlterView(yesOrNo bool, dbName, viewName string)
SetBuildingAlterView mocks base method.
func (*MockCompilerContext2) SetQueryingSubscription ¶ added in v0.8.0
func (m *MockCompilerContext2) SetQueryingSubscription(meta *SubscriptionMeta)
SetQueryingSubscription mocks base method.
func (*MockCompilerContext2) SetSnapshot ¶ added in v1.2.0
func (m *MockCompilerContext2) SetSnapshot(snapshot *Snapshot)
SetSnapshot mocks base method.
func (*MockCompilerContext2) SetViews ¶ added in v1.2.0
func (m *MockCompilerContext2) SetViews(views []string)
SetViews mocks base method.
type MockCompilerContext2MockRecorder ¶ added in v0.7.0
type MockCompilerContext2MockRecorder struct {
// contains filtered or unexported fields
}
MockCompilerContext2MockRecorder is the mock recorder for MockCompilerContext2.
func (*MockCompilerContext2MockRecorder) CheckSubscriptionValid ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) CheckSubscriptionValid(subName, accName, pubName interface{}) *gomock.Call
CheckSubscriptionValid indicates an expected call of CheckSubscriptionValid.
func (*MockCompilerContext2MockRecorder) CheckTimeStampValid ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) CheckTimeStampValid(ts interface{}) *gomock.Call
CheckTimeStampValid indicates an expected call of CheckTimeStampValid.
func (*MockCompilerContext2MockRecorder) DatabaseExists ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) DatabaseExists(name, snapshot interface{}) *gomock.Call
DatabaseExists indicates an expected call of DatabaseExists.
func (*MockCompilerContext2MockRecorder) DefaultDatabase ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) DefaultDatabase() *gomock.Call
DefaultDatabase indicates an expected call of DefaultDatabase.
func (*MockCompilerContext2MockRecorder) GetAccountId ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetAccountId() *gomock.Call
GetAccountId indicates an expected call of GetAccountId.
func (*MockCompilerContext2MockRecorder) GetBuildingAlterView ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetBuildingAlterView() *gomock.Call
GetBuildingAlterView indicates an expected call of GetBuildingAlterView.
func (*MockCompilerContext2MockRecorder) GetContext ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetContext() *gomock.Call
GetContext indicates an expected call of GetContext.
func (*MockCompilerContext2MockRecorder) GetDatabaseId ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) GetDatabaseId(dbName, snapshot interface{}) *gomock.Call
GetDatabaseId indicates an expected call of GetDatabaseId.
func (*MockCompilerContext2MockRecorder) GetLowerCaseTableNames ¶ added in v1.2.1
func (mr *MockCompilerContext2MockRecorder) GetLowerCaseTableNames() *gomock.Call
GetLowerCaseTableNames indicates an expected call of GetLowerCaseTableNames.
func (*MockCompilerContext2MockRecorder) GetPrimaryKeyDef ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetPrimaryKeyDef(dbName, tableName, snapshot interface{}) *gomock.Call
GetPrimaryKeyDef indicates an expected call of GetPrimaryKeyDef.
func (*MockCompilerContext2MockRecorder) GetProcess ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetProcess() *gomock.Call
GetProcess indicates an expected call of GetProcess.
func (*MockCompilerContext2MockRecorder) GetQueryResultMeta ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetQueryResultMeta(uuid interface{}) *gomock.Call
GetQueryResultMeta indicates an expected call of GetQueryResultMeta.
func (*MockCompilerContext2MockRecorder) GetQueryingSubscription ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) GetQueryingSubscription() *gomock.Call
GetQueryingSubscription indicates an expected call of GetQueryingSubscription.
func (*MockCompilerContext2MockRecorder) GetRootSql ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetRootSql() *gomock.Call
GetRootSql indicates an expected call of GetRootSql.
func (*MockCompilerContext2MockRecorder) GetSnapshot ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) GetSnapshot() *gomock.Call
GetSnapshot indicates an expected call of GetSnapshot.
func (*MockCompilerContext2MockRecorder) GetStatsCache ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) GetStatsCache() *gomock.Call
GetStatsCache indicates an expected call of GetStatsCache.
func (*MockCompilerContext2MockRecorder) GetSubscriptionMeta ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) GetSubscriptionMeta(dbName, snapshot interface{}) *gomock.Call
GetSubscriptionMeta indicates an expected call of GetSubscriptionMeta.
func (*MockCompilerContext2MockRecorder) GetUserName ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) GetUserName() *gomock.Call
GetUserName indicates an expected call of GetUserName.
func (*MockCompilerContext2MockRecorder) GetViews ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) GetViews() *gomock.Call
GetViews indicates an expected call of GetViews.
func (*MockCompilerContext2MockRecorder) IsPublishing ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) IsPublishing(dbName interface{}) *gomock.Call
IsPublishing indicates an expected call of IsPublishing.
func (*MockCompilerContext2MockRecorder) ReplacePlan ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) ReplacePlan(execPlan interface{}) *gomock.Call
ReplacePlan indicates an expected call of ReplacePlan.
func (*MockCompilerContext2MockRecorder) Resolve ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) Resolve(schemaName, tableName, snapshot interface{}) *gomock.Call
Resolve indicates an expected call of Resolve.
func (*MockCompilerContext2MockRecorder) ResolveAccountIds ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) ResolveAccountIds(accountNames interface{}) *gomock.Call
ResolveAccountIds indicates an expected call of ResolveAccountIds.
func (*MockCompilerContext2MockRecorder) ResolveById ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) ResolveById(tableId, snapshot interface{}) *gomock.Call
ResolveById indicates an expected call of ResolveById.
func (*MockCompilerContext2MockRecorder) ResolveSnapshotWithSnapshotName ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) ResolveSnapshotWithSnapshotName(snapshotName interface{}) *gomock.Call
ResolveSnapshotWithSnapshotName indicates an expected call of ResolveSnapshotWithSnapshotName.
func (*MockCompilerContext2MockRecorder) ResolveSubscriptionTableById ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) ResolveSubscriptionTableById(tableId, pubmeta interface{}) *gomock.Call
ResolveSubscriptionTableById indicates an expected call of ResolveSubscriptionTableById.
func (*MockCompilerContext2MockRecorder) ResolveUdf ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) ResolveUdf(name, args interface{}) *gomock.Call
ResolveUdf indicates an expected call of ResolveUdf.
func (*MockCompilerContext2MockRecorder) ResolveVariable ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) ResolveVariable(varName, isSystemVar, isGlobalVar interface{}) *gomock.Call
ResolveVariable indicates an expected call of ResolveVariable.
func (*MockCompilerContext2MockRecorder) SetBuildingAlterView ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) SetBuildingAlterView(yesOrNo, dbName, viewName interface{}) *gomock.Call
SetBuildingAlterView indicates an expected call of SetBuildingAlterView.
func (*MockCompilerContext2MockRecorder) SetQueryingSubscription ¶ added in v0.8.0
func (mr *MockCompilerContext2MockRecorder) SetQueryingSubscription(meta interface{}) *gomock.Call
SetQueryingSubscription indicates an expected call of SetQueryingSubscription.
func (*MockCompilerContext2MockRecorder) SetSnapshot ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) SetSnapshot(snapshot interface{}) *gomock.Call
SetSnapshot indicates an expected call of SetSnapshot.
func (*MockCompilerContext2MockRecorder) SetViews ¶ added in v1.2.0
func (mr *MockCompilerContext2MockRecorder) SetViews(views interface{}) *gomock.Call
SetViews indicates an expected call of SetViews.
func (*MockCompilerContext2MockRecorder) Stats ¶ added in v0.7.0
func (mr *MockCompilerContext2MockRecorder) Stats(obj, snapshot interface{}) *gomock.Call
Stats indicates an expected call of Stats.
type MockOptimizer ¶ added in v0.5.0
type MockOptimizer struct {
// contains filtered or unexported fields
}
func NewEmptyMockOptimizer ¶ added in v0.5.0
func NewEmptyMockOptimizer() *MockOptimizer
func NewMockOptimizer ¶ added in v0.5.0
func NewMockOptimizer(_ bool) *MockOptimizer
func (*MockOptimizer) CurrentContext ¶ added in v0.5.0
func (moc *MockOptimizer) CurrentContext() CompilerContext
type MockOptimizer2 ¶ added in v0.7.0
type MockOptimizer2 struct {
// contains filtered or unexported fields
}
MockOptimizer2 is a mock of Optimizer interface.
func NewMockOptimizer2 ¶ added in v0.7.0
func NewMockOptimizer2(ctrl *gomock.Controller) *MockOptimizer2
NewMockOptimizer2 creates a new mock instance.
func (*MockOptimizer2) CurrentContext ¶ added in v0.7.0
func (m *MockOptimizer2) CurrentContext() CompilerContext
CurrentContext mocks base method.
func (*MockOptimizer2) EXPECT ¶ added in v0.7.0
func (m *MockOptimizer2) EXPECT() *MockOptimizer2MockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockOptimizer2MockRecorder ¶ added in v0.7.0
type MockOptimizer2MockRecorder struct {
// contains filtered or unexported fields
}
MockOptimizer2MockRecorder is the mock recorder for MockOptimizer2.
func (*MockOptimizer2MockRecorder) CurrentContext ¶ added in v0.7.0
func (mr *MockOptimizer2MockRecorder) CurrentContext() *gomock.Call
CurrentContext indicates an expected call of CurrentContext.
func (*MockOptimizer2MockRecorder) Optimize ¶ added in v0.7.0
func (mr *MockOptimizer2MockRecorder) Optimize(stmt interface{}) *gomock.Call
Optimize indicates an expected call of Optimize.
type MockRule ¶ added in v0.7.0
type MockRule struct {
// contains filtered or unexported fields
}
MockRule is a mock of Rule interface.
func NewMockRule ¶ added in v0.7.0
func NewMockRule(ctrl *gomock.Controller) *MockRule
NewMockRule creates a new mock instance.
func (*MockRule) EXPECT ¶ added in v0.7.0
func (m *MockRule) EXPECT() *MockRuleMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRuleMockRecorder ¶ added in v0.7.0
type MockRuleMockRecorder struct {
// contains filtered or unexported fields
}
MockRuleMockRecorder is the mock recorder for MockRule.
func (*MockRuleMockRecorder) Apply ¶ added in v0.7.0
func (mr *MockRuleMockRecorder) Apply(arg0, arg1, arg2 interface{}) *gomock.Call
Apply indicates an expected call of Apply.
func (*MockRuleMockRecorder) Match ¶ added in v0.7.0
func (mr *MockRuleMockRecorder) Match(arg0 interface{}) *gomock.Call
Match indicates an expected call of Match.
type MultiTableIndex ¶ added in v1.1.0
type NameTuple ¶ added in v0.5.0
type NameTuple struct {
// contains filtered or unexported fields
}
type Optimizer ¶ added in v0.5.0
type Optimizer interface { Optimize(stmt tree.Statement) (*Query, error) CurrentContext() CompilerContext }
type OptimizerHints ¶ added in v1.2.0
type OptimizerHints struct {
// contains filtered or unexported fields
}
type OrderBinder ¶ added in v0.5.0
type OrderBinder struct { *ProjectionBinder // contains filtered or unexported fields }
func NewOrderBinder ¶ added in v0.5.0
func NewOrderBinder(projectionBinder *ProjectionBinder, selectList tree.SelectExprs) *OrderBinder
func (OrderBinder) GetContext ¶ added in v0.7.0
type OrderBySpec ¶ added in v0.6.0
type OrderBySpec = plan.OrderBySpec
type OriginTableMessageForFuzzy ¶ added in v1.1.0
fuzzy filter need to get partial unique key attrs name and its origin table name for Decimal type, we need colDef to get the scale
type PartitionBinder ¶ added in v0.6.0
type PartitionBinder struct {
// contains filtered or unexported fields
}
func NewPartitionBinder ¶ added in v0.6.0
func NewPartitionBinder(builder *QueryBuilder, ctx *BindContext) *PartitionBinder
func (*PartitionBinder) BindAggFunc ¶ added in v0.6.0
func (*PartitionBinder) BindColRef ¶ added in v0.6.0
func (p *PartitionBinder) BindColRef(name *tree.UnresolvedName, i int32, b bool) (*plan.Expr, error)
func (*PartitionBinder) BindSubquery ¶ added in v0.6.0
func (*PartitionBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*PartitionBinder) BindWinFunc ¶ added in v0.6.0
func (*PartitionBinder) GetContext ¶ added in v0.7.0
type PartitionByDef ¶ added in v0.7.0
type PartitionByDef = plan.PartitionByDef
func DeepCopyPartitionByDef ¶ added in v1.2.0
func DeepCopyPartitionByDef(partiiondef *PartitionByDef) *PartitionByDef
type PartitionPruneResult ¶ added in v1.1.0
type PartitionPruneResult struct {
// contains filtered or unexported fields
}
type Plan_Query ¶ added in v0.5.0
type Plan_Query = plan.Plan_Query
type PrimaryKeyDef ¶ added in v0.7.0
type PrimaryKeyDef = plan.PrimaryKeyDef
type ProjectionBinder ¶ added in v0.5.0
type ProjectionBinder struct {
// contains filtered or unexported fields
}
func NewProjectionBinder ¶ added in v0.5.0
func NewProjectionBinder(builder *QueryBuilder, ctx *BindContext, havingBinder *HavingBinder) *ProjectionBinder
func (*ProjectionBinder) BindAggFunc ¶ added in v0.5.0
func (*ProjectionBinder) BindColRef ¶ added in v0.5.0
func (b *ProjectionBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*ProjectionBinder) BindSubquery ¶ added in v0.5.0
func (*ProjectionBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*ProjectionBinder) BindWinFunc ¶ added in v0.5.0
func (*ProjectionBinder) GetContext ¶ added in v0.7.0
type PropertiesDef ¶ added in v0.6.0
type PropertiesDef = plan.PropertiesDef
type QueryBuilder ¶ added in v0.5.0
type QueryBuilder struct {
// contains filtered or unexported fields
}
func NewQueryBuilder ¶ added in v0.5.0
func NewQueryBuilder(queryType plan.Query_StatementType, ctx CompilerContext, isPrepareStatement bool, skipStats bool) *QueryBuilder
func (*QueryBuilder) GetContext ¶ added in v0.7.0
func (builder *QueryBuilder) GetContext() context.Context
func (*QueryBuilder) IsEquiJoin ¶ added in v0.8.0
func (builder *QueryBuilder) IsEquiJoin(node *plan.Node) bool
type RecomputeRealTimeRelatedFuncRule ¶ added in v0.7.0
type RecomputeRealTimeRelatedFuncRule struct {
// contains filtered or unexported fields
}
func NewRecomputeRealTimeRelatedFuncRule ¶ added in v0.7.0
func NewRecomputeRealTimeRelatedFuncRule(proc *process.Process) *RecomputeRealTimeRelatedFuncRule
func (*RecomputeRealTimeRelatedFuncRule) ApplyNode ¶ added in v0.7.0
func (r *RecomputeRealTimeRelatedFuncRule) ApplyNode(_ *Node) error
func (*RecomputeRealTimeRelatedFuncRule) IsApplyExpr ¶ added in v0.7.0
func (r *RecomputeRealTimeRelatedFuncRule) IsApplyExpr() bool
func (*RecomputeRealTimeRelatedFuncRule) MatchNode ¶ added in v0.7.0
func (r *RecomputeRealTimeRelatedFuncRule) MatchNode(_ *Node) bool
type RemapInfo ¶ added in v1.2.2
type RemapInfo struct {
// contains filtered or unexported fields
}
type ResetParamOrderRule ¶ added in v0.6.0
type ResetParamOrderRule struct {
// contains filtered or unexported fields
}
func NewResetParamOrderRule ¶ added in v0.6.0
func NewResetParamOrderRule(params map[int]int) *ResetParamOrderRule
func (*ResetParamOrderRule) ApplyNode ¶ added in v0.6.0
func (rule *ResetParamOrderRule) ApplyNode(node *Node) error
func (*ResetParamOrderRule) IsApplyExpr ¶ added in v0.6.0
func (rule *ResetParamOrderRule) IsApplyExpr() bool
func (*ResetParamOrderRule) MatchNode ¶ added in v0.6.0
func (rule *ResetParamOrderRule) MatchNode(_ *Node) bool
type ResetParamRefRule ¶ added in v0.6.0
type ResetParamRefRule struct {
// contains filtered or unexported fields
}
func NewResetParamRefRule ¶ added in v0.6.0
func NewResetParamRefRule(ctx context.Context, params []*Expr) *ResetParamRefRule
func (*ResetParamRefRule) ApplyNode ¶ added in v0.6.0
func (rule *ResetParamRefRule) ApplyNode(node *Node) error
func (*ResetParamRefRule) IsApplyExpr ¶ added in v0.6.0
func (rule *ResetParamRefRule) IsApplyExpr() bool
func (*ResetParamRefRule) MatchNode ¶ added in v0.6.0
func (rule *ResetParamRefRule) MatchNode(_ *Node) bool
type ResetVarRefRule ¶ added in v0.6.0
type ResetVarRefRule struct {
// contains filtered or unexported fields
}
func NewResetVarRefRule ¶ added in v0.6.0
func NewResetVarRefRule(compCtx CompilerContext, proc *process.Process) *ResetVarRefRule
func (*ResetVarRefRule) ApplyNode ¶ added in v0.6.0
func (rule *ResetVarRefRule) ApplyNode(node *Node) error
func (*ResetVarRefRule) IsApplyExpr ¶ added in v0.6.0
func (rule *ResetVarRefRule) IsApplyExpr() bool
func (*ResetVarRefRule) MatchNode ¶ added in v0.6.0
func (rule *ResetVarRefRule) MatchNode(_ *Node) bool
type RowsetData ¶ added in v0.5.0
type RowsetData = plan.RowsetData
type SampleFuncCtx ¶ added in v1.1.0
type SampleFuncCtx struct {
// contains filtered or unexported fields
}
func (*SampleFuncCtx) BindSampleColumn ¶ added in v1.1.0
func (s *SampleFuncCtx) BindSampleColumn(ctx *BindContext, binder *ProjectionBinder, sampleList tree.SelectExprs) ([]*plan.Expr, error)
func (*SampleFuncCtx) GenerateSampleFunc ¶ added in v1.1.0
func (s *SampleFuncCtx) GenerateSampleFunc(se *tree.SampleExpr) error
func (*SampleFuncCtx) SetStartOffset ¶ added in v1.1.0
func (s *SampleFuncCtx) SetStartOffset(start, offset int)
type SetBinder ¶ added in v0.8.0
type SetBinder struct {
// contains filtered or unexported fields
}
SetBinder for 'set @var = expr'
func NewSetVarBinder ¶ added in v0.8.0
func NewSetVarBinder(builder *QueryBuilder, ctx *BindContext) *SetBinder
func (*SetBinder) BindAggFunc ¶ added in v0.8.0
func (*SetBinder) BindColRef ¶ added in v0.8.0
func (*SetBinder) BindSubquery ¶ added in v0.8.0
func (*SetBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*SetBinder) BindWinFunc ¶ added in v0.8.0
func (*SetBinder) GetContext ¶ added in v0.8.0
type SnapshotTenant ¶ added in v1.2.0
type SnapshotTenant = plan.SnapshotTenant
type StatsCache ¶ added in v0.8.0
type StatsCache struct {
// contains filtered or unexported fields
}
func NewStatsCache ¶ added in v0.8.0
func NewStatsCache() *StatsCache
func (*StatsCache) GetStatsInfo ¶ added in v1.2.0
func (sc *StatsCache) GetStatsInfo(tableID uint64, create bool) *pb.StatsInfo
GetStatsInfo returns the stats info and if the info in the cache needs to be updated.
func (*StatsCache) SetStatsInfo ¶ added in v1.2.0
func (sc *StatsCache) SetStatsInfo(tableID uint64, s *pb.StatsInfo)
SetStatsInfo updates the stats info in the cache.
type SubscriptionMeta ¶ added in v0.8.0
type SubscriptionMeta = plan.SubscriptionMeta
type TableBinder ¶ added in v0.5.0
type TableBinder struct {
// contains filtered or unexported fields
}
func NewTableBinder ¶ added in v0.5.0
func NewTableBinder(builder *QueryBuilder, ctx *BindContext) *TableBinder
func (*TableBinder) BindAggFunc ¶ added in v0.5.0
func (*TableBinder) BindColRef ¶ added in v0.5.0
func (b *TableBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*TableBinder) BindSubquery ¶ added in v0.5.0
func (*TableBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*TableBinder) BindWinFunc ¶ added in v0.5.0
func (*TableBinder) GetContext ¶ added in v0.7.0
type TableDefType ¶ added in v0.6.0
type TableDefType = plan.TableDef_DefType
type TableDef_DefType_Properties ¶ added in v0.6.0
type TableDef_DefType_Properties = plan.TableDef_DefType_Properties
type UnorderedSet ¶ added in v1.2.1
func (UnorderedSet[T]) Find ¶ added in v1.2.1
func (set UnorderedSet[T]) Find(val T) bool
func (UnorderedSet[T]) Insert ¶ added in v1.2.1
func (set UnorderedSet[T]) Insert(val T)
type UpdateBinder ¶ added in v0.8.0
type UpdateBinder struct {
// contains filtered or unexported fields
}
func NewUpdateBinder ¶ added in v0.8.0
func NewUpdateBinder(sysCtx context.Context, builder *QueryBuilder, ctx *BindContext, cols []*ColDef) *UpdateBinder
use for on duplicate key update clause: eg: insert into t1 values(1,1),(2,2) on duplicate key update a = a + abs(b), b = values(b)-2
func (*UpdateBinder) BindAggFunc ¶ added in v0.8.0
func (*UpdateBinder) BindColRef ¶ added in v0.8.0
func (b *UpdateBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*UpdateBinder) BindSubquery ¶ added in v0.8.0
func (*UpdateBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*UpdateBinder) BindWinFunc ¶ added in v0.8.0
func (*UpdateBinder) GetContext ¶ added in v0.8.0
type VisitPlan ¶ added in v0.6.0
type VisitPlan struct {
// contains filtered or unexported fields
}
func NewVisitPlan ¶ added in v0.6.0
func NewVisitPlan(pl *Plan, rules []VisitPlanRule) *VisitPlan
type VisitPlanRule ¶ added in v0.6.0
type WhereBinder ¶ added in v0.5.0
type WhereBinder struct {
// contains filtered or unexported fields
}
func NewWhereBinder ¶ added in v0.5.0
func NewWhereBinder(builder *QueryBuilder, ctx *BindContext) *WhereBinder
func (*WhereBinder) BindAggFunc ¶ added in v0.5.0
func (*WhereBinder) BindColRef ¶ added in v0.5.0
func (b *WhereBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)
func (*WhereBinder) BindSubquery ¶ added in v0.5.0
func (*WhereBinder) BindTimeWindowFunc ¶ added in v1.1.0
func (*WhereBinder) BindWinFunc ¶ added in v0.5.0
func (*WhereBinder) GetContext ¶ added in v0.7.0
Source Files ¶
- agg_pushdown_pullup.go
- alter_partition_util.go
- alter_util.go
- apply_indices.go
- apply_indices_master.go
- apply_indices_vector.go
- associative_law.go
- base_binder.go
- bind_context.go
- binding.go
- build.go
- build_alter_add_column.go
- build_alter_add_primarykey.go
- build_alter_change_column.go
- build_alter_modify_column.go
- build_alter_rename_column.go
- build_alter_table.go
- build_constraint_util.go
- build_dcl.go
- build_ddl.go
- build_delete.go
- build_dml_util.go
- build_index_util.go
- build_insert.go
- build_load.go
- build_replace.go
- build_sample.go
- build_show.go
- build_show_util.go
- build_transation.go
- build_update.go
- build_util.go
- build_values.go
- build_vector_index_util.go
- const.go
- current_account.go
- deepcopy.go
- default_binder.go
- distinct_agg.go
- expr_opt.go
- external.go
- flatten_subquery.go
- fromOldFunction.go
- generate_series.go
- group_binder.go
- having_binder.go
- join_order.go
- limit_binder.go
- make.go
- message.go
- meta_scan.go
- metadata_scan.go
- mock.go
- mysql_compatibility.go
- opt_misc.go
- optimize.go
- order_binder.go
- partition.go
- partition_binder.go
- partition_hash.go
- partition_key.go
- partition_list.go
- partition_prune.go
- partition_range.go
- partition_util.go
- processlist.go
- projection_binder.go
- pushdown.go
- query_builder.go
- result_scan.go
- runtime_filter.go
- set_binder.go
- shuffle.go
- shuffle_algo.go
- stats.go
- system_view.go
- table_binder.go
- tools.go
- types.go
- types_mock.go
- unnest.go
- update_binder.go
- utils.go
- visit_plan.go
- visit_plan_rule.go
- where_binder.go