planner

package
v0.0.0-...-7b16d43 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plan

func Plan(rule *api.Rule, storePath string) (*xstream.TopologyNew, error)

func PlanWithSourcesAndSinks

func PlanWithSourcesAndSinks(rule *api.Rule, storePath string, sources []*nodes.SourceNode, sinks []*nodes.SinkNode) (*xstream.TopologyNew, error)

For test only

Types

type AggregatePlan

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

func (*AggregatePlan) Children

func (p *AggregatePlan) Children() []LogicalPlan

func (AggregatePlan) Init

func (p AggregatePlan) Init() *AggregatePlan

func (*AggregatePlan) PruneColumns

func (p *AggregatePlan) PruneColumns(fields []xsql.Expr) error

func (*AggregatePlan) PushDownPredicate

func (p *AggregatePlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

By default, push down the predicate to the first child instead of the children as most plan cannot have multiple children

func (*AggregatePlan) SetChildren

func (p *AggregatePlan) SetChildren(children []LogicalPlan)

type DataSourcePlan

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

func (*DataSourcePlan) Children

func (p *DataSourcePlan) Children() []LogicalPlan

func (DataSourcePlan) Init

func (p DataSourcePlan) Init() *DataSourcePlan

func (*DataSourcePlan) PruneColumns

func (p *DataSourcePlan) PruneColumns(fields []xsql.Expr) error

func (*DataSourcePlan) PushDownPredicate

func (p *DataSourcePlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

Presume no children for data source

func (*DataSourcePlan) SetChildren

func (p *DataSourcePlan) SetChildren(children []LogicalPlan)

type FilterPlan

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

func (*FilterPlan) Children

func (p *FilterPlan) Children() []LogicalPlan

func (FilterPlan) Init

func (p FilterPlan) Init() *FilterPlan

func (*FilterPlan) PruneColumns

func (p *FilterPlan) PruneColumns(fields []xsql.Expr) error

func (*FilterPlan) PushDownPredicate

func (p *FilterPlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

func (*FilterPlan) SetChildren

func (p *FilterPlan) SetChildren(children []LogicalPlan)

type HavingPlan

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

func (*HavingPlan) Children

func (p *HavingPlan) Children() []LogicalPlan

func (HavingPlan) Init

func (p HavingPlan) Init() *HavingPlan

func (*HavingPlan) PruneColumns

func (p *HavingPlan) PruneColumns(fields []xsql.Expr) error

func (*HavingPlan) PushDownPredicate

func (p *HavingPlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

By default, push down the predicate to the first child instead of the children as most plan cannot have multiple children

func (*HavingPlan) SetChildren

func (p *HavingPlan) SetChildren(children []LogicalPlan)

type JoinPlan

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

func (*JoinPlan) Children

func (p *JoinPlan) Children() []LogicalPlan

func (JoinPlan) Init

func (p JoinPlan) Init() *JoinPlan

func (*JoinPlan) PruneColumns

func (p *JoinPlan) PruneColumns(fields []xsql.Expr) error

func (*JoinPlan) PushDownPredicate

func (p *JoinPlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

func (*JoinPlan) SetChildren

func (p *JoinPlan) SetChildren(children []LogicalPlan)

type LogicalPlan

type LogicalPlan interface {
	Children() []LogicalPlan
	SetChildren(children []LogicalPlan)
	// PushDownPredicate pushes down the filter in the filter/where/on/having clauses as deeply as possible.
	// It will accept a condition that is an expression slice, and return the expressions that can't be pushed.
	// It also return the new tree of plan as it can possibly change the tree
	PushDownPredicate(xsql.Expr) (xsql.Expr, LogicalPlan)
	// Prune the unused columns in the data source level, by pushing all needed columns down
	PruneColumns(fields []xsql.Expr) error
}

type OrderPlan

type OrderPlan struct {
	SortFields xsql.SortFields
	// contains filtered or unexported fields
}

func (*OrderPlan) Children

func (p *OrderPlan) Children() []LogicalPlan

func (OrderPlan) Init

func (p OrderPlan) Init() *OrderPlan

func (*OrderPlan) PruneColumns

func (p *OrderPlan) PruneColumns(fields []xsql.Expr) error

func (*OrderPlan) PushDownPredicate

func (p *OrderPlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

By default, push down the predicate to the first child instead of the children as most plan cannot have multiple children

func (*OrderPlan) SetChildren

func (p *OrderPlan) SetChildren(children []LogicalPlan)

type ProjectPlan

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

func (*ProjectPlan) Children

func (p *ProjectPlan) Children() []LogicalPlan

func (ProjectPlan) Init

func (p ProjectPlan) Init() *ProjectPlan

func (*ProjectPlan) PruneColumns

func (p *ProjectPlan) PruneColumns(fields []xsql.Expr) error

func (*ProjectPlan) PushDownPredicate

func (p *ProjectPlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

By default, push down the predicate to the first child instead of the children as most plan cannot have multiple children

func (*ProjectPlan) SetChildren

func (p *ProjectPlan) SetChildren(children []LogicalPlan)

type WindowPlan

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

func (*WindowPlan) Children

func (p *WindowPlan) Children() []LogicalPlan

func (WindowPlan) Init

func (p WindowPlan) Init() *WindowPlan

func (*WindowPlan) PruneColumns

func (p *WindowPlan) PruneColumns(fields []xsql.Expr) error

func (*WindowPlan) PushDownPredicate

func (p *WindowPlan) PushDownPredicate(condition xsql.Expr) (xsql.Expr, LogicalPlan)

func (*WindowPlan) SetChildren

func (p *WindowPlan) SetChildren(children []LogicalPlan)

Jump to

Keyboard shortcuts

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