plan

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicalPlan

type LogicalPlan struct {
	Steps    map[parser.NodeID]LogicalStep
	Pipeline []parser.NodeID // Ordered list of steps to be performed
}

LogicalPlan converts a DAG into a list of steps to be executed in order

func NewLogicalPlan

func NewLogicalPlan(transforms parser.Nodes, edges parser.Edges) (LogicalPlan, error)

NewLogicalPlan creates a plan from the DAG structure

func (LogicalPlan) Clone

func (l LogicalPlan) Clone() LogicalPlan

Clone the plan

func (LogicalPlan) String

func (l LogicalPlan) String() string

type LogicalStep

type LogicalStep struct {
	Parents   []parser.NodeID
	Children  []parser.NodeID
	Transform parser.Node
}

LogicalStep is a single step in a logical plan

func (LogicalStep) Clone

func (l LogicalStep) Clone() LogicalStep

Clone the step, the transform is immutable so its left as is

func (LogicalStep) ID

func (l LogicalStep) ID() parser.NodeID

ID is a convenience method to expose the inner transforms' ID

func (LogicalStep) String

func (l LogicalStep) String() string

type PhysicalPlan

type PhysicalPlan struct {
	ResultStep       ResultOp
	TimeSpec         transform.TimeSpec
	Debug            bool
	BlockType        models.FetchedBlockType
	LookbackDuration time.Duration
	// contains filtered or unexported fields
}

PhysicalPlan represents the physical plan.

func NewPhysicalPlan

func NewPhysicalPlan(
	lp LogicalPlan,
	params models.RequestParams,
) (PhysicalPlan, error)

NewPhysicalPlan is used to generate a physical plan. Its responsibilities include creating consolidation nodes, result nodes, pushing down predicates, and changing the ordering for nodes. nolint: unparam

func (PhysicalPlan) Step

func (p PhysicalPlan) Step(ID parser.NodeID) (LogicalStep, bool)

Step gets the logical step using its unique ID in the DAG.

func (PhysicalPlan) String

func (p PhysicalPlan) String() string

String representation of the physical plan.

type ResultOp

type ResultOp struct {
	Parent parser.NodeID
}

ResultOp is responsible for delivering results to the clients.

Jump to

Keyboard shortcuts

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