Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptGroupTask ¶
func NewOptGroupTask(ctx cascadesctx.CascadesContext, g *memo.Group) base.Task
NewOptGroupTask returns a new optimizing group task.
func NewSimpleTaskScheduler ¶
NewSimpleTaskScheduler return a simple task scheduler, init logic included.
Types ¶
type ApplyRuleTask ¶
type ApplyRuleTask struct { BaseTask // contains filtered or unexported fields }
ApplyRuleTask is a wrapper of running basic logic union of scheduling apply rule.
func NewApplyRuleTask ¶
func NewApplyRuleTask(ctx cascadesctx.CascadesContext, gE *memo.GroupExpression, r rule.Rule) *ApplyRuleTask
NewApplyRuleTask return a new apply rule task.
func (*ApplyRuleTask) Desc ¶
func (a *ApplyRuleTask) Desc(w util.StrBufferWriter)
Desc implements the task.Desc interface.
func (*ApplyRuleTask) Execute ¶
func (a *ApplyRuleTask) Execute() error
Execute implements the task.Execute interface.
type BaseTask ¶
type BaseTask struct {
// contains filtered or unexported fields
}
BaseTask is base task wrapper structure for encapsulating basic things.
type OptGroupExpressionTask ¶
type OptGroupExpressionTask struct { BaseTask // contains filtered or unexported fields }
OptGroupExpressionTask is a wrapper of running logic of exploring group expression.
func NewOptGroupExpressionTask ¶
func NewOptGroupExpressionTask(ctx cascadesctx.CascadesContext, ge *memo.GroupExpression) *OptGroupExpressionTask
NewOptGroupExpressionTask return a targeting optimizing group expression task.
func (*OptGroupExpressionTask) Desc ¶
func (ge *OptGroupExpressionTask) Desc(w util.StrBufferWriter)
Desc implements the task.Desc interface.
func (*OptGroupExpressionTask) Execute ¶
func (ge *OptGroupExpressionTask) Execute() error
Execute implements the task.Execute interface.
type OptGroupTask ¶
type OptGroupTask struct { BaseTask // contains filtered or unexported fields }
OptGroupTask is a wrapper of running logic of exploring a group.
func (*OptGroupTask) Desc ¶
func (g *OptGroupTask) Desc(w util.StrBufferWriter)
Desc implements the task.Desc interface.
func (*OptGroupTask) Execute ¶
func (g *OptGroupTask) Execute() error
Execute implements the task.Execute interface.
type SimpleTaskScheduler ¶
type SimpleTaskScheduler struct {
// contains filtered or unexported fields
}
SimpleTaskScheduler is defined for serializing scheduling of memo tasks.
func (*SimpleTaskScheduler) Destroy ¶
func (s *SimpleTaskScheduler) Destroy()
Destroy release all the allocated elements inside stack.
func (*SimpleTaskScheduler) ExecuteTasks ¶
func (s *SimpleTaskScheduler) ExecuteTasks() error
ExecuteTasks implements the interface of TaskScheduler.
func (*SimpleTaskScheduler) PushTask ¶
func (s *SimpleTaskScheduler) PushTask(task base.Task)
PushTask implements the scheduler's interface, add another task into scheduler.
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack is used to store the optimizing tasks created before or during the optimizing process.
func (*Stack) Desc ¶
func (ts *Stack) Desc(w util.StrBufferWriter)
Desc is used to desc the detail info about current stack state. when use customized stack to drive the tasks, the call-chain state is dived in the stack.
func (*Stack) Destroy ¶
func (ts *Stack) Destroy()
Destroy indicates that when stack itself is useless like in the end of optimizing phase, we can destroy ourselves.