plan

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

plan build & optimize logical plan

Index

Constants

View Source
const (
	JoinSideNone       int8 = 0
	JoinSideLeft            = 1 << iota
	JoinSideRight           = 1 << iota
	JoinSideBoth            = JoinSideLeft | JoinSideRight
	JoinSideCorrelated      = 1 << iota
)
View Source
const (
	NotFound      int32 = math.MaxInt32
	AmbiguousName int32 = math.MinInt32
)
View Source
const MO_CATALOG_DB_NAME = "mo_catalog"
View Source
const MO_DEFUALT_HOSTNAME = "localhost"
View Source
const SF float64 = 1

Variables

View Source
var MakePlan2Float64ConstExprWithType = makePlan2Float64ConstExprWithType
View Source
var MakePlan2Int64ConstExprWithType = makePlan2Int64ConstExprWithType
View Source
var MakePlan2StringConstExprWithType = makePlan2StringConstExprWithType
View Source
var MakePlan2Type = makePlan2Type
View Source
var MakeTypeByPlan2Expr = makeTypeByPlan2Expr

Functions

func BuildIndexInfos added in v0.6.0

func BuildIndexInfos(ctx CompilerContext, dbName string, defs []*plan.TableDef_DefType) []*plan.IndexInfo

func ConstantFold added in v0.6.0

func ConstantFold(bat *batch.Batch, e *plan.Expr) (*plan.Expr, error)

func DeepCopyColData added in v0.6.0

func DeepCopyColData(col *plan.ColData) *plan.ColData

func DeepCopyColDef added in v0.6.0

func DeepCopyColDef(col *plan.ColDef) *plan.ColDef

func DeepCopyDataDefinition added in v0.6.0

func DeepCopyDataDefinition(old *plan.DataDefinition) *plan.DataDefinition

func DeepCopyDefault added in v0.6.0

func DeepCopyDefault(def *plan.Default) *plan.Default

func DeepCopyInsertValues added in v0.6.0

func DeepCopyInsertValues(insert *plan.InsertValues) *plan.InsertValues

func DeepCopyNode added in v0.6.0

func DeepCopyNode(node *plan.Node) *plan.Node

func DeepCopyOnUpdate added in v0.6.0

func DeepCopyOnUpdate(old *plan.OnUpdate) *plan.OnUpdate

func DeepCopyOrderBy added in v0.6.0

func DeepCopyOrderBy(orderBy *plan.OrderBySpec) *plan.OrderBySpec

func DeepCopyQuery added in v0.6.0

func DeepCopyQuery(qry *plan.Query) *plan.Query

func DeepCopyTableDef added in v0.6.0

func DeepCopyTableDef(table *plan.TableDef) *plan.TableDef

func DeepCopyTyp added in v0.6.0

func DeepCopyTyp(typ *plan.Type) *plan.Type

func GetBindings added in v0.5.0

func GetBindings(expr *plan.Expr) []int32

func GetProjectNode added in v0.6.0

func GetProjectNode(stmt *tree.Load, ctx CompilerContext, node *plan.Node, Name2ColIndex map[string]int32) error

func InitNullMap added in v0.6.0

func InitNullMap(stmt *tree.Load) error

func MakeExpr added in v0.6.0

func MakeExpr(name string, args []*Expr) *plan.Expr

func MakeInsertError added in v0.6.0

func MakeInsertError(id types.T, col *ColDef, rows []tree.Exprs, colIdx, rowIdx int) error

func SetPlanLoadTag added in v0.6.0

func SetPlanLoadTag(pn *Plan)

Types

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 (*BaseOptimizer) CurrentContext added in v0.5.0

func (opt *BaseOptimizer) CurrentContext() CompilerContext

func (*BaseOptimizer) Optimize added in v0.5.0

func (opt *BaseOptimizer) Optimize(stmt tree.Statement) (*Query, error)

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)
}

type Binding added in v0.5.0

type Binding struct {
	// contains filtered or unexported fields
}

func NewBinding added in v0.5.0

func NewBinding(tag, nodeID int32, table string, cols []string, types []*plan.Type) *Binding

func (*Binding) FindColumn added in v0.5.0

func (b *Binding) FindColumn(col string) int32

type BindingTreeNode added in v0.5.0

type BindingTreeNode struct {
	// contains filtered or unexported fields
}

type CTERef added in v0.5.0

type CTERef struct {
	// contains filtered or unexported fields
}

type ColDef added in v0.5.0

type ColDef = plan.ColDef

func GetResultColumnsFromPlan added in v0.5.0

func GetResultColumnsFromPlan(p *Plan) []*ColDef

GetResultColumnsFromPlan

type ColRef added in v0.5.0

type ColRef = plan.ColRef

type ColRefRemapping added in v0.5.0

type ColRefRemapping struct {
	// contains filtered or unexported fields
}

type CompilerContext added in v0.5.0

type CompilerContext interface {
	// Default database/schema in context
	DefaultDatabase() string
	// check if database exist
	DatabaseExists(name string) bool
	// get table definition by database/schema
	Resolve(schemaName string, tableName string) (*ObjectRef, *TableDef)
	// get the value of variable
	ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error)
	// get the definition of primary key
	GetPrimaryKeyDef(dbName string, tableName string) []*ColDef
	// get the definition of hide key
	GetHideKeyDef(dbName string, tableName string) *ColDef
	// get estimated cost by table & expr
	Cost(obj *ObjectRef, e *Expr) *Cost
	// get origin sql string of the root
	GetRootSql() string
	// get username of current session
	GetUserName() string
	GetAccountId() uint32
}

type Const added in v0.5.0

type Const = plan.Const

type Cost added in v0.5.0

type Cost = plan.Cost

type DefaultBinder added in v0.6.0

type DefaultBinder struct {
	// contains filtered or unexported fields
}

func NewDefaultBinder added in v0.6.0

func NewDefaultBinder(builder *QueryBuilder, ctx *BindContext, typ *Type, cols []string) *DefaultBinder

func (*DefaultBinder) BindAggFunc added in v0.6.0

func (b *DefaultBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*DefaultBinder) BindColRef added in v0.6.0

func (b *DefaultBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*DefaultBinder) BindExpr added in v0.6.0

func (b *DefaultBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*DefaultBinder) BindSubquery added in v0.6.0

func (b *DefaultBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*DefaultBinder) BindWinFunc added in v0.6.0

func (b *DefaultBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

type ExecInfo added in v0.6.0

type ExecInfo struct {
	Typ        ExecType
	WithGPU    bool
	WithBigMem bool
	CnNumbers  int
}

func GetExecTypeFromPlan added in v0.6.0

func GetExecTypeFromPlan(_ *Plan) ExecInfo

GetExecType get executor will execute base AP or TP

type ExecType added in v0.6.0

type ExecType int
const (
	ExecTypeAP ExecType = iota
	ExecTypeTP
)

type Expr added in v0.5.0

type Expr = plan.Expr

func DeepCopyExpr added in v0.5.0

func DeepCopyExpr(expr *Expr) *Expr

func DeepCopyExprList added in v0.6.0

func DeepCopyExprList(list []*Expr) []*Expr

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) ApplyExpr added in v0.6.0

func (rule *GetParamRule) ApplyExpr(e *plan.Expr) (*plan.Expr, error)

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) *GroupBinder

func (*GroupBinder) BindAggFunc added in v0.5.0

func (b *GroupBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*GroupBinder) BindColRef added in v0.5.0

func (b *GroupBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*GroupBinder) BindExpr added in v0.5.0

func (b *GroupBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*GroupBinder) BindSubquery added in v0.5.0

func (b *GroupBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*GroupBinder) BindWinFunc added in v0.5.0

func (b *GroupBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

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 (b *HavingBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*HavingBinder) BindColRef added in v0.5.0

func (b *HavingBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*HavingBinder) BindExpr added in v0.5.0

func (b *HavingBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*HavingBinder) BindSubquery added in v0.5.0

func (b *HavingBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*HavingBinder) BindWinFunc added in v0.5.0

func (b *HavingBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

type IndexDef added in v0.6.0

type IndexDef = plan.IndexDef

type IndexInfo added in v0.6.0

type IndexInfo = plan.IndexInfo

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 (b *LimitBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*LimitBinder) BindColRef added in v0.5.0

func (b *LimitBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*LimitBinder) BindExpr added in v0.5.0

func (b *LimitBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*LimitBinder) BindSubquery added in v0.5.0

func (b *LimitBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*LimitBinder) BindWinFunc added in v0.5.0

func (b *LimitBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

type MaxValue added in v0.6.0

type MaxValue = plan.MaxValue

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() *MockCompilerContext

func (*MockCompilerContext) Cost added in v0.5.0

func (m *MockCompilerContext) Cost(obj *ObjectRef, e *Expr) *Cost

func (*MockCompilerContext) DatabaseExists added in v0.5.0

func (m *MockCompilerContext) DatabaseExists(name string) 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

func (*MockCompilerContext) GetHideKeyDef added in v0.5.0

func (m *MockCompilerContext) GetHideKeyDef(dbName string, tableName string) *ColDef

func (*MockCompilerContext) GetPrimaryKeyDef added in v0.5.0

func (m *MockCompilerContext) GetPrimaryKeyDef(dbName string, tableName string) []*ColDef

func (*MockCompilerContext) GetRootSql added in v0.6.0

func (m *MockCompilerContext) GetRootSql() string

func (*MockCompilerContext) GetUserName added in v0.6.0

func (m *MockCompilerContext) GetUserName() string

func (*MockCompilerContext) Resolve added in v0.5.0

func (m *MockCompilerContext) Resolve(dbName string, tableName string) (*ObjectRef, *TableDef)

func (*MockCompilerContext) ResolveVariable added in v0.5.0

func (m *MockCompilerContext) ResolveVariable(varName string, isSystemVar, isGlobalVar bool) (interface{}, error)

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() *MockOptimizer

func (*MockOptimizer) CurrentContext added in v0.5.0

func (moc *MockOptimizer) CurrentContext() CompilerContext

func (*MockOptimizer) Optimize added in v0.5.0

func (moc *MockOptimizer) Optimize(stmt tree.Statement) (*Query, error)

type NameTuple added in v0.5.0

type NameTuple struct {
	// contains filtered or unexported fields
}

type Node added in v0.5.0

type Node = plan.Node

type ObjectRef added in v0.5.0

type ObjectRef = plan.ObjectRef

type Optimizer added in v0.5.0

type Optimizer interface {
	Optimize(stmt tree.Statement) (*Query, error)
	CurrentContext() CompilerContext
}

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) BindExpr added in v0.5.0

func (b *OrderBinder) BindExpr(astExpr tree.Expr) (*plan.Expr, error)

type OrderBySpec added in v0.6.0

type OrderBySpec = plan.OrderBySpec

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 (p *PartitionBinder) BindAggFunc(s string, expr *tree.FuncExpr, i int32, b bool) (*plan.Expr, error)

func (*PartitionBinder) BindColRef added in v0.6.0

func (p *PartitionBinder) BindColRef(name *tree.UnresolvedName, i int32, b bool) (*plan.Expr, error)

func (*PartitionBinder) BindExpr added in v0.6.0

func (p *PartitionBinder) BindExpr(expr tree.Expr, i int32, b bool) (*plan.Expr, error)

func (*PartitionBinder) BindSubquery added in v0.6.0

func (p *PartitionBinder) BindSubquery(subquery *tree.Subquery, b bool) (*plan.Expr, error)

func (*PartitionBinder) BindWinFunc added in v0.6.0

func (p *PartitionBinder) BindWinFunc(s string, expr *tree.FuncExpr, i int32, b bool) (*plan.Expr, error)

type PartitionInfo added in v0.6.0

type PartitionInfo = plan.PartitionInfo

type Plan

type Plan = plan.Plan

func BuildPlan added in v0.5.0

func BuildPlan(ctx CompilerContext, stmt tree.Statement) (*Plan, error)

func DeepCopyPlan added in v0.6.0

func DeepCopyPlan(pl *Plan) *Plan

type Plan_Query added in v0.5.0

type Plan_Query = plan.Plan_Query

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 (b *ProjectionBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*ProjectionBinder) BindColRef added in v0.5.0

func (b *ProjectionBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*ProjectionBinder) BindExpr added in v0.5.0

func (b *ProjectionBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*ProjectionBinder) BindSubquery added in v0.5.0

func (b *ProjectionBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*ProjectionBinder) BindWinFunc added in v0.5.0

func (b *ProjectionBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

type PropertiesDef added in v0.6.0

type PropertiesDef = plan.PropertiesDef

type Property added in v0.6.0

type Property = plan.Property

type Query

type Query = plan.Query

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) *QueryBuilder

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) ApplyExpr added in v0.6.0

func (rule *ResetParamOrderRule) ApplyExpr(e *plan.Expr) (*plan.Expr, error)

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(params []*Expr) *ResetParamRefRule

func (*ResetParamRefRule) ApplyExpr added in v0.6.0

func (rule *ResetParamRefRule) ApplyExpr(e *plan.Expr) (*plan.Expr, error)

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) *ResetVarRefRule

func (*ResetVarRefRule) ApplyExpr added in v0.6.0

func (rule *ResetVarRefRule) ApplyExpr(e *plan.Expr) (*plan.Expr, error)

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 Rule added in v0.5.0

type Rule interface {
	Match(*Node) bool    // rule match?
	Apply(*Node, *Query) // apply the rule
}

type Schema added in v0.5.0

type Schema struct {
	// contains filtered or unexported fields
}

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 (b *TableBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*TableBinder) BindColRef added in v0.5.0

func (b *TableBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*TableBinder) BindExpr added in v0.5.0

func (b *TableBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*TableBinder) BindSubquery added in v0.5.0

func (b *TableBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*TableBinder) BindWinFunc added in v0.5.0

func (b *TableBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

type TableDef added in v0.5.0

type TableDef = plan.TableDef

type TableDefType added in v0.6.0

type TableDefType = plan.TableDef_DefType

type TableDef_DefType_Idx added in v0.6.0

type TableDef_DefType_Idx = plan.TableDef_DefType_Idx

type TableDef_DefType_Partition added in v0.6.0

type TableDef_DefType_Partition = plan.TableDef_DefType_Partition

type TableDef_DefType_Properties added in v0.6.0

type TableDef_DefType_Properties = plan.TableDef_DefType_Properties

type TableDef_DefType_View added in v0.6.0

type TableDef_DefType_View = plan.TableDef_DefType_View

type Type added in v0.5.0

type Type = plan.Type

type ViewData added in v0.6.0

type ViewData struct {
	Stmt            string
	DefaultDatabase string
}

type ViewDef added in v0.6.0

type ViewDef = plan.ViewDef

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

func (*VisitPlan) Visit added in v0.6.0

func (vq *VisitPlan) Visit() error

type VisitPlanRule added in v0.6.0

type VisitPlanRule interface {
	MatchNode(*Node) bool
	IsApplyExpr() bool
	ApplyNode(*Node) error
	ApplyExpr(*Expr) (*Expr, error)
}

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 (b *WhereBinder) BindAggFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

func (*WhereBinder) BindColRef added in v0.5.0

func (b *WhereBinder) BindColRef(astExpr *tree.UnresolvedName, depth int32, isRoot bool) (*plan.Expr, error)

func (*WhereBinder) BindExpr added in v0.5.0

func (b *WhereBinder) BindExpr(astExpr tree.Expr, depth int32, isRoot bool) (*plan.Expr, error)

func (*WhereBinder) BindSubquery added in v0.5.0

func (b *WhereBinder) BindSubquery(astExpr *tree.Subquery, isRoot bool) (*plan.Expr, error)

func (*WhereBinder) BindWinFunc added in v0.5.0

func (b *WhereBinder) BindWinFunc(funcName string, astExpr *tree.FuncExpr, depth int32, isRoot bool) (*plan.Expr, error)

Directories

Path Synopsis
explain explain statement
explain explain statement

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL