spec

package
v0.186.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MockKind = "mock"

Variables

This section is empty.

Functions

func CreateLogicalMockNode

func CreateLogicalMockNode(id string) *plan.LogicalNode

CreateLogicalMockNode creates a mock plan node that doesn't match any rules (other than rules that match any node)

func CreatePhysicalMockNode

func CreatePhysicalMockNode(id string) *plan.PhysicalPlanNode

CreatePhysicalMockNode creates a mock plan node that doesn't match any rules (other than rules that match any node)

func CreatePlanSpec

func CreatePlanSpec(spec *PlanSpec) *plan.Spec

CreatePlanSpec creates a logical plan from a set of nodes and edges

Types

type MockProcedureSpec

type MockProcedureSpec struct {
	plan.DefaultCost
	OutputAttributesFn     func() plan.PhysicalAttributes
	PassThroughAttributeFn func(attrKey string) bool
	RequiredAttributesFn   func() []plan.PhysicalAttributes
	PlanDetailsFn          func() string
}

MockProcedureSpec provides a type that implements ProcedureSpec but does not require importing packages which register rules and procedure kinds, which makes it useful for unit testing.

func (MockProcedureSpec) Copy

func (MockProcedureSpec) Kind

func (MockProcedureSpec) OutputAttributes added in v0.175.0

func (s MockProcedureSpec) OutputAttributes() plan.PhysicalAttributes

func (MockProcedureSpec) PassThroughAttribute added in v0.175.0

func (s MockProcedureSpec) PassThroughAttribute(attrKey string) bool

func (MockProcedureSpec) PlanDetails added in v0.175.0

func (s MockProcedureSpec) PlanDetails() string

func (MockProcedureSpec) RequiredAttributes added in v0.175.0

func (s MockProcedureSpec) RequiredAttributes() []plan.PhysicalAttributes

type PlanSpec

type PlanSpec struct {
	Nodes []plan.Node

	// Edges is a list of predecessor-to-successor edges.
	// [1, 3] => Nodes[1] is a predecessor of Nodes[3].
	// Predecessor ordering must be encoded in this list.
	Edges [][2]int

	Resources flux.ResourceManagement

	Now time.Time
}

Spec is a set of nodes and edges of a logical query plan

func (*PlanSpec) Copy

func (ps *PlanSpec) Copy() *PlanSpec

Copy makes a copy of a Spec.

Jump to

Keyboard shortcuts

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