octosql: github.com/cube2222/octosql/execution/tvf Index | Files | Directories

package tvf

import "github.com/cube2222/octosql/execution/tvf"

Index

Package Files

percentile_watermark_generator.go range.go test_utils.go tumble.go watermark_generator.go

func ExpectWatermarkValue Uses

func ExpectWatermarkValue(t *testing.T, ctx context.Context, ws execution.WatermarkSource, tx storage.StateTransaction, expected time.Time)

func NextRecord Uses

func NextRecord(t *testing.T, ctx context.Context, rs execution.RecordStream)

type PercentileWatermarkGenerator Uses

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

func NewPercentileWatermarkGenerator Uses

func NewPercentileWatermarkGenerator(source execution.Node, timeField octosql.VariableName, events, percentile, frequency execution.Expression) *PercentileWatermarkGenerator

func (*PercentileWatermarkGenerator) Get Uses

func (w *PercentileWatermarkGenerator) Get(ctx context.Context, variables octosql.Variables, streamID *execution.StreamID) (execution.RecordStream, *execution.ExecutionOutput, error)

type PercentileWatermarkGeneratorStream Uses

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

The way this watermark generator is working is following: - events (must be positive) - represents amount of (most recent) events stored - percentile (must be positive and less than 100.0) - represents percentile of recently stored events that are BIGGER than watermark value

ex. if percentile = 35 then 35% of events stored must be bigger than watermark value, so watermark position is at
	65th percentile of events stored (in sorted way)

- frequency (must be positive) - represents amount of events to be seen before initiating next watermark update Generator stores recent events in deque, their counts in map and number of events seen before watermark update in value state After <frequency> number of events it updates watermark

func (*PercentileWatermarkGeneratorStream) Close Uses

func (s *PercentileWatermarkGeneratorStream) Close(ctx context.Context, storage storage.Storage) error

func (*PercentileWatermarkGeneratorStream) GetWatermark Uses

func (s *PercentileWatermarkGeneratorStream) GetWatermark(ctx context.Context, tx storage.StateTransaction) (time.Time, error)

func (*PercentileWatermarkGeneratorStream) Next Uses

func (s *PercentileWatermarkGeneratorStream) Next(ctx context.Context) (*execution.Record, error)

type Range Uses

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

func NewRange Uses

func NewRange(start, end execution.Expression) *Range

func (*Range) Document Uses

func (r *Range) Document() docs.Documentation

func (*Range) Get Uses

func (r *Range) Get(ctx context.Context, variables octosql.Variables, streamID *execution.StreamID) (execution.RecordStream, *execution.ExecutionOutput, error)

type RangeStream Uses

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

func (*RangeStream) Close Uses

func (s *RangeStream) Close(ctx context.Context, storage storage.Storage) error

func (*RangeStream) Next Uses

func (s *RangeStream) Next(ctx context.Context) (*execution.Record, error)

type Tumble Uses

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

func NewTumble Uses

func NewTumble(source execution.Node, timeField octosql.VariableName, windowLength, offset execution.Expression) *Tumble

func (*Tumble) Document Uses

func (r *Tumble) Document() docs.Documentation

func (*Tumble) Get Uses

func (r *Tumble) Get(ctx context.Context, variables octosql.Variables, streamID *execution.StreamID) (execution.RecordStream, *execution.ExecutionOutput, error)

type TumbleStream Uses

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

func (*TumbleStream) Close Uses

func (s *TumbleStream) Close(ctx context.Context, storage storage.Storage) error

func (*TumbleStream) Next Uses

func (s *TumbleStream) Next(ctx context.Context) (*execution.Record, error)

type WatermarkGenerator Uses

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

func NewWatermarkGenerator Uses

func NewWatermarkGenerator(source execution.Node, timeField octosql.VariableName, offset execution.Expression) *WatermarkGenerator

func (*WatermarkGenerator) Get Uses

func (w *WatermarkGenerator) Get(ctx context.Context, variables octosql.Variables, streamID *execution.StreamID) (execution.RecordStream, *execution.ExecutionOutput, error)

type WatermarkGeneratorStream Uses

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

func (*WatermarkGeneratorStream) Close Uses

func (s *WatermarkGeneratorStream) Close(ctx context.Context, storage storage.Storage) error

func (*WatermarkGeneratorStream) GetWatermark Uses

func (s *WatermarkGeneratorStream) GetWatermark(ctx context.Context, tx storage.StateTransaction) (time.Time, error)

func (*WatermarkGeneratorStream) Next Uses

func (s *WatermarkGeneratorStream) Next(ctx context.Context) (*execution.Record, error)

Directories

PathSynopsis
docgen

Package tvf imports 10 packages (graph) and is imported by 2 packages. Updated 2020-08-02. Refresh now. Tools for package owners.