Documentation ¶
Index ¶
- Constants
- Variables
- func Formatted(p PlanReader, opts ...FormatOption) fmt.Formatter
- func RegisterProcedureSpec(k ProcedureKind, c CreateProcedureSpec, qks ...query.OperationKind)
- func RegisterRewriteRule(r RewriteRule)
- type Administration
- type AggregateProcedureSpec
- type BoundedProcedureSpec
- type BoundsSpec
- type CreateProcedureSpec
- type FormatOption
- type LogicalPlanSpec
- type LogicalPlanner
- type ParentAwareProcedureSpec
- type PlanReader
- type PlanRewriter
- type PlanSpec
- type Planner
- type Procedure
- type ProcedureID
- type ProcedureKind
- type ProcedureSpec
- type PushDownProcedureSpec
- type PushDownRule
- type RewriteRule
- type Shard
- type ShardMap
- type Storage
- type TimeRange
- type WindowSpec
- type YieldProcedureSpec
- type YieldSpec
Constants ¶
View Source
const DefaultYieldName = "_result"
DefaultYieldName is the yield name to use in cases where no explicit yield name was specified.
Variables ¶
View Source
var NilUUID uuid.UUID
View Source
var RootUUID = NilUUID
Functions ¶
func Formatted ¶
func Formatted(p PlanReader, opts ...FormatOption) fmt.Formatter
func RegisterProcedureSpec ¶
func RegisterProcedureSpec(k ProcedureKind, c CreateProcedureSpec, qks ...query.OperationKind)
RegisterProcedureSpec registers a new procedure with the specified kind. The call panics if the kind is not unique.
func RegisterRewriteRule ¶ added in v0.0.5
func RegisterRewriteRule(r RewriteRule)
Types ¶
type Administration ¶ added in v0.0.4
type Administration interface {
ConvertID(query.OperationID) ProcedureID
}
type AggregateProcedureSpec ¶ added in v0.0.5
type AggregateProcedureSpec interface { // AggregateMethod specifies which aggregate method to push down to the storage layer. AggregateMethod() string // ReAggregateSpec specifies an aggregate procedure to use when aggregating the individual pushed down results. ReAggregateSpec() ProcedureSpec }
type BoundedProcedureSpec ¶
type BoundedProcedureSpec interface {
TimeBounds() BoundsSpec
}
type BoundsSpec ¶
func (BoundsSpec) Union ¶
func (b BoundsSpec) Union(o BoundsSpec, now time.Time) (u BoundsSpec)
type CreateProcedureSpec ¶
type CreateProcedureSpec func(query.OperationSpec, Administration) (ProcedureSpec, error)
type FormatOption ¶
type FormatOption func(*formatter)
TODO(nathanielc): Add better options for formatting plans as Graphviz dot format.
func UseIDs ¶
func UseIDs() FormatOption
type LogicalPlanSpec ¶
type LogicalPlanSpec struct { Procedures map[ProcedureID]*Procedure Order []ProcedureID Resources query.ResourceManagement }
func (*LogicalPlanSpec) Do ¶
func (lp *LogicalPlanSpec) Do(f func(pr *Procedure))
type LogicalPlanner ¶
type LogicalPlanner interface {
Plan(*query.Spec) (*LogicalPlanSpec, error)
}
func NewLogicalPlanner ¶
func NewLogicalPlanner() LogicalPlanner
type ParentAwareProcedureSpec ¶ added in v0.0.4
type ParentAwareProcedureSpec interface {
ParentChanged(old, new ProcedureID)
}
type PlanReader ¶
type PlanReader interface { Do(func(*Procedure)) // contains filtered or unexported methods }
type PlanRewriter ¶ added in v0.0.5
type PlanSpec ¶
type PlanSpec struct { // Now represents the relative currentl time of the plan. Now time.Time Bounds BoundsSpec // Procedures is a set of all operations Procedures map[ProcedureID]*Procedure Order []ProcedureID // Results is a list of datasets that are the result of the plan Results map[string]YieldSpec Resources query.ResourceManagement }
type Planner ¶
type Planner interface { // Plan create a plan from the logical plan and available storage. Plan(p *LogicalPlanSpec, s Storage, now time.Time) (*PlanSpec, error) }
func NewPlanner ¶
func NewPlanner() Planner
type Procedure ¶
type Procedure struct { ID ProcedureID Parents []ProcedureID Children []ProcedureID Spec ProcedureSpec // contains filtered or unexported fields }
func (*Procedure) DoChildren ¶ added in v0.0.5
type ProcedureID ¶
var ZeroProcedureID ProcedureID
func ProcedureIDForDuplicate ¶
func ProcedureIDForDuplicate(id ProcedureID) ProcedureID
func ProcedureIDFromOperationID ¶
func ProcedureIDFromOperationID(id query.OperationID) ProcedureID
func ProcedureIDFromParentID ¶ added in v0.0.5
func ProcedureIDFromParentID(id ProcedureID) ProcedureID
func (ProcedureID) String ¶
func (id ProcedureID) String() string
type ProcedureSpec ¶
type ProcedureSpec interface { // Kind returns the kind of the procedure. Kind() ProcedureKind Copy() ProcedureSpec }
ProcedureSpec specifies an operation as part of a query.
type PushDownProcedureSpec ¶
type PushDownProcedureSpec interface { PushDownRules() []PushDownRule PushDown(root *Procedure, dup func() *Procedure) }
type PushDownRule ¶
type PushDownRule struct { Root ProcedureKind Through []ProcedureKind Match func(ProcedureSpec) bool }
TODO(nathanielc): make this more formal using commute/associative properties
type RewriteRule ¶ added in v0.0.5
type RewriteRule interface { Root() ProcedureKind Rewrite(*Procedure, PlanRewriter) error }
type WindowSpec ¶
type YieldProcedureSpec ¶ added in v0.0.5
type YieldProcedureSpec interface {
YieldName() string
}
type YieldSpec ¶ added in v0.0.5
type YieldSpec struct {
ID ProcedureID
}
YieldSpec defines how data should be yielded.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.