execution

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MPL-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

View Source
const BTreeDefaultDegree = 12

Variables

View Source
var WatermarkMaxValue = time.Unix(0, math.MaxInt64)

Functions

func NewCountingTriggerPrototype added in v0.4.0

func NewCountingTriggerPrototype(triggerAfter uint) func() Trigger

func NewEndOfStreamTriggerPrototype added in v0.4.0

func NewEndOfStreamTriggerPrototype() func() Trigger

func NewMultiTriggerPrototype added in v0.4.0

func NewMultiTriggerPrototype(triggerPrototypes []func() Trigger) func() Trigger

func NewWatermarkTriggerPrototype added in v0.4.0

func NewWatermarkTriggerPrototype(timeFieldKeyIndex int) func() Trigger

func ProduceFnApplyContext added in v0.4.0

func ProduceFnApplyContext(fn ProduceFn, ctx ProduceContext) func(record Record) error

Types

type And

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

func NewAnd

func NewAnd(args []Expression) *And

func (*And) Evaluate

func (c *And) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type Cast added in v0.4.0

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

func NewCast added in v0.4.0

func NewCast(targetTypeID octosql.TypeID, expr Expression) *Cast

func (*Cast) Evaluate added in v0.4.0

func (c *Cast) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type Coalesce added in v0.4.0

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

func NewCoalesce added in v0.4.0

func NewCoalesce(args []Expression, objectLayoutFixer *ObjectLayoutFixer) *Coalesce

func (*Coalesce) Evaluate added in v0.4.0

func (c *Coalesce) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type Constant

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

func NewConstant

func NewConstant(value octosql.Value) *Constant

func (*Constant) Evaluate

func (c *Constant) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type CountingTrigger added in v0.3.0

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

func (*CountingTrigger) EndOfStreamReached added in v0.4.0

func (c *CountingTrigger) EndOfStreamReached()

func (*CountingTrigger) KeyReceived added in v0.4.0

func (c *CountingTrigger) KeyReceived(key GroupKey)

func (*CountingTrigger) Poll added in v0.4.0

func (c *CountingTrigger) Poll() []GroupKey

The returned slice will be made invalid after following operations on the trigger.

func (*CountingTrigger) WatermarkReceived added in v0.4.0

func (c *CountingTrigger) WatermarkReceived(watermark time.Time)

type EndOfStreamTrigger added in v0.4.0

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

func (*EndOfStreamTrigger) EndOfStreamReached added in v0.4.0

func (c *EndOfStreamTrigger) EndOfStreamReached()

func (*EndOfStreamTrigger) KeyReceived added in v0.4.0

func (c *EndOfStreamTrigger) KeyReceived(key GroupKey)

func (*EndOfStreamTrigger) Poll added in v0.4.0

func (c *EndOfStreamTrigger) Poll() []GroupKey

func (*EndOfStreamTrigger) WatermarkReceived added in v0.4.0

func (c *EndOfStreamTrigger) WatermarkReceived(watermark time.Time)

type ExecutionContext added in v0.4.0

type ExecutionContext struct {
	context.Context
	VariableContext *VariableContext
}

func (ExecutionContext) WithRecord added in v0.4.0

func (ctx ExecutionContext) WithRecord(record Record) ExecutionContext

type Expression

type Expression interface {
	Evaluate(ctx ExecutionContext) (octosql.Value, error)
}

type FunctionCall added in v0.4.0

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

func NewFunctionCall added in v0.4.0

func NewFunctionCall(function func([]octosql.Value) (octosql.Value, error), args []Expression, nullCheckIndices []int) *FunctionCall

func (*FunctionCall) Evaluate added in v0.4.0

func (c *FunctionCall) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type GroupKey added in v0.4.0

type GroupKey []octosql.Value

func (GroupKey) GetGroupKey added in v0.4.0

func (key GroupKey) GetGroupKey() GroupKey

func (GroupKey) Less added in v0.4.0

func (key GroupKey) Less(than btree.Item) bool

type GroupKeyIface added in v0.4.0

type GroupKeyIface interface {
	GetGroupKey() GroupKey
}

type LayoutMapping added in v0.5.0

type LayoutMapping struct {
	Struct *struct {
		SourceIndex   []int
		SourceMapping []LayoutMapping
	}
	List *struct {
		ElementMapping LayoutMapping
	}
	Tuple *struct {
		ElementMapping []LayoutMapping
	}
}

type MetaSendFn added in v0.4.0

type MetaSendFn func(ctx ProduceContext, msg MetadataMessage) error

type MetadataMessage added in v0.4.0

type MetadataMessage struct {
	Type      MetadataMessageType
	Watermark time.Time
}

type MetadataMessageType added in v0.4.0

type MetadataMessageType int
const (
	MetadataMessageTypeWatermark MetadataMessageType = iota
)

type MultiColumnQueryExpression added in v0.4.0

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

func NewMultiColumnQueryExpression added in v0.4.0

func NewMultiColumnQueryExpression(source Node) *MultiColumnQueryExpression

func (*MultiColumnQueryExpression) Evaluate added in v0.4.0

type MultiTrigger added in v0.3.0

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

func (*MultiTrigger) EndOfStreamReached added in v0.4.0

func (c *MultiTrigger) EndOfStreamReached()

func (*MultiTrigger) KeyReceived added in v0.4.0

func (c *MultiTrigger) KeyReceived(key GroupKey)

func (*MultiTrigger) Poll added in v0.4.0

func (c *MultiTrigger) Poll() []GroupKey

func (*MultiTrigger) WatermarkReceived added in v0.4.0

func (c *MultiTrigger) WatermarkReceived(watermark time.Time)

type Node

type Node interface {
	Run(ctx ExecutionContext, produce ProduceFn, metaSend MetaSendFn) error
}

type ObjectFieldAccess added in v0.5.0

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

func NewObjectFieldAccess added in v0.5.0

func NewObjectFieldAccess(object Expression, fieldIndex int) *ObjectFieldAccess

func (*ObjectFieldAccess) Evaluate added in v0.5.0

type ObjectLayoutFixer added in v0.5.0

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

func NewObjectLayoutFixer added in v0.5.0

func NewObjectLayoutFixer(targetType octosql.Type, sourceTypes []octosql.Type) *ObjectLayoutFixer

func (*ObjectLayoutFixer) FixLayout added in v0.5.0

func (f *ObjectLayoutFixer) FixLayout(index int, value octosql.Value) octosql.Value

type Or

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

func NewOr

func NewOr(args []Expression) *Or

func (*Or) Evaluate

func (c *Or) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type ProduceContext added in v0.4.0

type ProduceContext struct {
	context.Context
}

func ProduceFromExecutionContext added in v0.4.0

func ProduceFromExecutionContext(ctx ExecutionContext) ProduceContext

type ProduceFn added in v0.4.0

type ProduceFn func(ctx ProduceContext, record Record) error

type Record

type Record struct {
	Values     []octosql.Value
	Retraction bool
	EventTime  time.Time
}

func NewRecord

func NewRecord(values []octosql.Value, retraction bool, eventTime time.Time) Record

Functional options?

func (Record) String added in v0.2.0

func (record Record) String() string

type RecordEventTimeBuffer added in v0.4.0

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

func NewRecordEventTimeBuffer added in v0.4.0

func NewRecordEventTimeBuffer() *RecordEventTimeBuffer

func (*RecordEventTimeBuffer) AddRecord added in v0.4.0

func (b *RecordEventTimeBuffer) AddRecord(record Record)

func (*RecordEventTimeBuffer) Emit added in v0.4.0

func (b *RecordEventTimeBuffer) Emit(watermark time.Time, produce func(record Record) error) error

type SingleColumnQueryExpression added in v0.4.0

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

func NewSingleColumnQueryExpression added in v0.4.0

func NewSingleColumnQueryExpression(source Node) *SingleColumnQueryExpression

func (*SingleColumnQueryExpression) Evaluate added in v0.4.0

type Trigger added in v0.3.0

type Trigger interface {
	EndOfStreamReached()
	WatermarkReceived(watermark time.Time)
	KeyReceived(key GroupKey)
	Poll() []GroupKey
}

type Tuple added in v0.4.0

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

func NewTuple

func NewTuple(args []Expression) *Tuple

func (*Tuple) Evaluate added in v0.4.0

func (c *Tuple) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type TypeAssertion added in v0.4.0

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

func NewTypeAssertion added in v0.4.0

func NewTypeAssertion(expectedTypeID []octosql.TypeID, expr Expression, expectedTypeName string) *TypeAssertion

func (*TypeAssertion) Evaluate added in v0.4.0

func (c *TypeAssertion) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type Variable

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

func NewVariable

func NewVariable(level, index int) *Variable

func (*Variable) Evaluate added in v0.4.0

func (r *Variable) Evaluate(ctx ExecutionContext) (octosql.Value, error)

type VariableContext added in v0.4.0

type VariableContext struct {
	Parent *VariableContext
	Values []octosql.Value
}

func (*VariableContext) WithRecord added in v0.4.0

func (varCtx *VariableContext) WithRecord(record Record) *VariableContext

type WatermarkTrigger added in v0.3.0

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

func (*WatermarkTrigger) EndOfStreamReached added in v0.4.0

func (c *WatermarkTrigger) EndOfStreamReached()

func (*WatermarkTrigger) KeyReceived added in v0.4.0

func (c *WatermarkTrigger) KeyReceived(key GroupKey)

TODO: Event time has to be the first element of the key.

func (*WatermarkTrigger) Poll added in v0.4.0

func (c *WatermarkTrigger) Poll() []GroupKey

The returned slice will be made invalid after following operations on the trigger.

func (*WatermarkTrigger) WatermarkReceived added in v0.4.0

func (c *WatermarkTrigger) WatermarkReceived(watermark time.Time)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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