octosql: github.com/cube2222/octosql/physical Index | Files | Directories

package physical

import "github.com/cube2222/octosql/physical"

Index

Package Files

config.go datasource.go distinct.go filter.go function.go group_by.go logic.go lookup_join.go map.go order_by.go physical.go relation.go requalifier.go shuffle.go shuffle_strategy.go stream_join.go test_utils.go tvf.go

type Aggregate Uses

type Aggregate string
const (
    Avg           Aggregate = "avg"
    AvgDistinct   Aggregate = "avg_distinct"
    Count         Aggregate = "count"
    CountDistinct Aggregate = "count_distinct"
    First         Aggregate = "first"
    Key           Aggregate = "key"
    Last          Aggregate = "last"
    Max           Aggregate = "max"
    Min           Aggregate = "min"
    Sum           Aggregate = "sum"
    SumDistinct   Aggregate = "sum_distinct"
)

func NewAggregate Uses

func NewAggregate(aggregate string) Aggregate

type AliasedExpression Uses

type AliasedExpression struct {
    ExpressionAlias octosql.VariableName
    Expr            Expression
}

AliasedExpression describes an expression which is explicitly named.

func NewAliasedExpression Uses

func NewAliasedExpression(name octosql.VariableName, expr Expression) *AliasedExpression

func (*AliasedExpression) DoesMatchNamespace Uses

func (alExpr *AliasedExpression) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*AliasedExpression) ExpressionName Uses

func (alExpr *AliasedExpression) ExpressionName() octosql.VariableName

func (*AliasedExpression) Materialize Uses

func (alExpr *AliasedExpression) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*AliasedExpression) MaterializeNamed Uses

func (alExpr *AliasedExpression) MaterializeNamed(ctx context.Context, matCtx *MaterializationContext) (execution.NamedExpression, error)

func (*AliasedExpression) Transform Uses

func (alExpr *AliasedExpression) Transform(ctx context.Context, transformers *Transformers) Expression

func (*AliasedExpression) TransformNamed Uses

func (alExpr *AliasedExpression) TransformNamed(ctx context.Context, transformers *Transformers) NamedExpression

func (*AliasedExpression) Visualize Uses

func (alExpr *AliasedExpression) Visualize() *graph.Node

type And Uses

type And struct {
    Left, Right Formula
}

func NewAnd Uses

func NewAnd(left Formula, right Formula) *And

func (*And) DoesMatchNamespace Uses

func (f *And) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*And) ExtractPredicates Uses

func (f *And) ExtractPredicates() []*Predicate

func (*And) Materialize Uses

func (f *And) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Formula, error)

func (*And) SplitByAnd Uses

func (f *And) SplitByAnd() []Formula

func (*And) Transform Uses

func (f *And) Transform(ctx context.Context, transformers *Transformers) Formula

func (*And) Visualize Uses

func (f *And) Visualize() *graph.Node

type Constant Uses

type Constant struct {
    Value bool
}

func NewConstant Uses

func NewConstant(value bool) *Constant

func (*Constant) DoesMatchNamespace Uses

func (f *Constant) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*Constant) ExtractPredicates Uses

func (f *Constant) ExtractPredicates() []*Predicate

func (*Constant) Materialize Uses

func (f *Constant) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Formula, error)

func (*Constant) SplitByAnd Uses

func (f *Constant) SplitByAnd() []Formula

func (*Constant) Transform Uses

func (f *Constant) Transform(ctx context.Context, transformers *Transformers) Formula

func (*Constant) Visualize Uses

func (f *Constant) Visualize() *graph.Node

type ConstantStrategy Uses

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

func (*ConstantStrategy) Materialize Uses

func (s *ConstantStrategy) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.ShuffleStrategyPrototype, error)

func (*ConstantStrategy) Transform Uses

func (s *ConstantStrategy) Transform(ctx context.Context, transformers *Transformers) ShuffleStrategy

func (*ConstantStrategy) Visualize Uses

func (s *ConstantStrategy) Visualize() *graph.Node

type CountingTrigger Uses

type CountingTrigger struct {
    Count Expression
}

func NewCountingTrigger Uses

func NewCountingTrigger(count Expression) *CountingTrigger

func (*CountingTrigger) Materialize Uses

func (c *CountingTrigger) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.TriggerPrototype, error)

func (*CountingTrigger) Transform Uses

func (c *CountingTrigger) Transform(ctx context.Context, transformers *Transformers) Trigger

func (*CountingTrigger) Visualize Uses

func (c *CountingTrigger) Visualize() *graph.Node

type DataSourceBuilder Uses

type DataSourceBuilder struct {
    Materializer     DataSourceMaterializerFunc
    PrimaryKeys      []octosql.VariableName
    AvailableFilters map[FieldType]map[Relation]struct{}
    Filter           Formula
    Name             string
    Alias            string
    Partition        int

    // This field will be used to decide on join strategies or if the source is a stream.
    Cardinality metadata.Cardinality
}

DataSourceBuilder is used to build a data source instance with an alias. It may be given filters, which are later executed at the database level.

func (*DataSourceBuilder) Materialize Uses

func (dsb *DataSourceBuilder) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*DataSourceBuilder) Metadata Uses

func (dsb *DataSourceBuilder) Metadata() *metadata.NodeMetadata

func (*DataSourceBuilder) Transform Uses

func (dsb *DataSourceBuilder) Transform(ctx context.Context, transformers *Transformers) Node

func (*DataSourceBuilder) Visualize Uses

func (dsb *DataSourceBuilder) Visualize() *graph.Node

type DataSourceBuilderFactory Uses

type DataSourceBuilderFactory func(name, alias string) []Node

DataSourceBuilderFactory is a function used to create a new aliased data source builder.

func NewDataSourceBuilderFactory Uses

func NewDataSourceBuilderFactory(materializer DataSourceMaterializerFunc, primaryKeys []octosql.VariableName, availableFilters map[FieldType]map[Relation]struct{}, cardinality metadata.Cardinality, partitions int) DataSourceBuilderFactory

type DataSourceMaterializerFunc Uses

type DataSourceMaterializerFunc func(ctx context.Context, matCtx *MaterializationContext, dbConfig map[string]interface{}, filter Formula, alias string, partition int) (execution.Node, error)

type DataSourceRepository Uses

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

DataSourceRepository is used to register factories for builders for any data source. It can also later create a builder for any of those data source.

func CreateDataSourceRepositoryFromConfig Uses

func CreateDataSourceRepositoryFromConfig(factories map[string]Factory, config *config.Config) (*DataSourceRepository, error)

CreateDataSourceRepositoryFromConfig creates a DataSourceRepository from a config, using the given configuration reading data source factories. The map should be given as databaseType -> Factory.

func NewDataSourceRepository Uses

func NewDataSourceRepository() *DataSourceRepository

func (*DataSourceRepository) Get Uses

func (repo *DataSourceRepository) Get(dataSourceName, alias string) ([]Node, error)

Get gets a new builder for a given data source.

func (*DataSourceRepository) Register Uses

func (repo *DataSourceRepository) Register(dataSourceName string, factory DataSourceBuilderFactory) error

Register registers a builder factory for the given data source ColumnName.

func (*DataSourceRepository) WithFactory Uses

func (repo *DataSourceRepository) WithFactory(dataSourceName string, factory DataSourceBuilderFactory) *DataSourceRepository

Register registers a builder factory for the given data source ColumnName.

type DelayTrigger Uses

type DelayTrigger struct {
    Delay Expression
}

func NewDelayTrigger Uses

func NewDelayTrigger(delay Expression) *DelayTrigger

func (*DelayTrigger) Materialize Uses

func (c *DelayTrigger) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.TriggerPrototype, error)

func (*DelayTrigger) Transform Uses

func (c *DelayTrigger) Transform(ctx context.Context, transformers *Transformers) Trigger

func (*DelayTrigger) Visualize Uses

func (c *DelayTrigger) Visualize() *graph.Node

type Distinct Uses

type Distinct struct {
    Source Node
}

func NewDistinct Uses

func NewDistinct(child Node) *Distinct

func (*Distinct) Materialize Uses

func (node *Distinct) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*Distinct) Metadata Uses

func (node *Distinct) Metadata() *metadata.NodeMetadata

func (*Distinct) Transform Uses

func (node *Distinct) Transform(ctx context.Context, transformers *Transformers) Node

func (*Distinct) Visualize Uses

func (node *Distinct) Visualize() *graph.Node

type Expression Uses

type Expression interface {
    // Transform returns a new Expression after recursively calling Transform
    Transform(ctx context.Context, transformers *Transformers) Expression
    Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)
    DoesMatchNamespace(namespace *metadata.Namespace) bool
    graph.Visualizer
}

Expressions describes a single value source.

func NewRecordExpression Uses

func NewRecordExpression() Expression

type Factory Uses

type Factory func(dbConfig map[string]interface{}) (DataSourceBuilderFactory, error)

type FieldType Uses

type FieldType string

FieldType describes if a key is a primary or secondary attribute.

const (
    Primary   FieldType = "primary"
    Secondary FieldType = "secondary"
)

type Filter Uses

type Filter struct {
    Formula Formula
    Source  Node
}

func NewFilter Uses

func NewFilter(formula Formula, child Node) *Filter

func (*Filter) Materialize Uses

func (node *Filter) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*Filter) Metadata Uses

func (node *Filter) Metadata() *metadata.NodeMetadata

func (*Filter) Transform Uses

func (node *Filter) Transform(ctx context.Context, transformers *Transformers) Node

func (*Filter) Visualize Uses

func (node *Filter) Visualize() *graph.Node

type Formula Uses

type Formula interface {
    // Transform returns a new Formula after recursively calling Transform
    Transform(ctx context.Context, transformers *Transformers) Formula
    SplitByAnd() []Formula
    ExtractPredicates() []*Predicate
    Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Formula, error)
    DoesMatchNamespace(namespace *metadata.Namespace) bool
    graph.Visualizer
}

Formula describes any source of a logical value.

type FunctionExpression Uses

type FunctionExpression struct {
    Name      string
    Arguments []Expression
}

func NewFunctionExpression Uses

func NewFunctionExpression(name string, args []Expression) *FunctionExpression

func (*FunctionExpression) DoesMatchNamespace Uses

func (fe *FunctionExpression) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*FunctionExpression) Materialize Uses

func (fe *FunctionExpression) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*FunctionExpression) Transform Uses

func (fe *FunctionExpression) Transform(ctx context.Context, transformers *Transformers) Expression

func (*FunctionExpression) Visualize Uses

func (fe *FunctionExpression) Visualize() *graph.Node

type GroupBy Uses

type GroupBy struct {
    Source Node
    Key    []Expression

    Fields     []octosql.VariableName
    Aggregates []Aggregate

    As  []octosql.VariableName

    Triggers []Trigger
}

func NewGroupBy Uses

func NewGroupBy(source Node, key []Expression, fields []octosql.VariableName, aggregates []Aggregate, as []octosql.VariableName, triggers []Trigger) *GroupBy

func (*GroupBy) Materialize Uses

func (node *GroupBy) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*GroupBy) Metadata Uses

func (node *GroupBy) Metadata() *metadata.NodeMetadata

func (*GroupBy) Transform Uses

func (node *GroupBy) Transform(ctx context.Context, transformers *Transformers) Node

func (*GroupBy) Visualize Uses

func (node *GroupBy) Visualize() *graph.Node

type KeyHashingStrategy Uses

type KeyHashingStrategy struct {
    Key []Expression
}

func (*KeyHashingStrategy) Materialize Uses

func (s *KeyHashingStrategy) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.ShuffleStrategyPrototype, error)

func (*KeyHashingStrategy) Transform Uses

func (s *KeyHashingStrategy) Transform(ctx context.Context, transformers *Transformers) ShuffleStrategy

func (*KeyHashingStrategy) Visualize Uses

func (s *KeyHashingStrategy) Visualize() *graph.Node

type LogicExpression Uses

type LogicExpression struct {
    Formula Formula
}

LogicExpressions describes a boolean expression which get's it's value from the logic formula underneath.

func NewLogicExpression Uses

func NewLogicExpression(formula Formula) *LogicExpression

func (*LogicExpression) DoesMatchNamespace Uses

func (le *LogicExpression) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*LogicExpression) Materialize Uses

func (le *LogicExpression) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*LogicExpression) Transform Uses

func (le *LogicExpression) Transform(ctx context.Context, transformers *Transformers) Expression

func (*LogicExpression) Visualize Uses

func (le *LogicExpression) Visualize() *graph.Node

type LookupJoin Uses

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

func NewLookupJoin Uses

func NewLookupJoin(source, joined Node, isLeftJoin bool) *LookupJoin

func (*LookupJoin) Materialize Uses

func (node *LookupJoin) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*LookupJoin) Metadata Uses

func (node *LookupJoin) Metadata() *metadata.NodeMetadata

func (*LookupJoin) Transform Uses

func (node *LookupJoin) Transform(ctx context.Context, transformers *Transformers) Node

func (*LookupJoin) Visualize Uses

func (node *LookupJoin) Visualize() *graph.Node

type Map Uses

type Map struct {
    Expressions []NamedExpression
    Source      Node
    Keep        bool
}

func NewMap Uses

func NewMap(expressions []NamedExpression, child Node, keep bool) *Map

func (*Map) Materialize Uses

func (node *Map) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*Map) Metadata Uses

func (node *Map) Metadata() *metadata.NodeMetadata

func (*Map) Transform Uses

func (node *Map) Transform(ctx context.Context, transformers *Transformers) Node

func (*Map) Visualize Uses

func (node *Map) Visualize() *graph.Node

type MaterializationContext Uses

type MaterializationContext struct {
    Config  *config.Config
    Storage storage.Storage
}

MaterializationContext is a structure containing the configuration for the materialization.

func NewMaterializationContext Uses

func NewMaterializationContext(config *config.Config, storage storage.Storage) *MaterializationContext

type NamedExpression Uses

type NamedExpression interface {
    Expression
    // TransformNamed returns a new NamedExpression after recursively calling Transform
    ExpressionName() octosql.VariableName
    TransformNamed(ctx context.Context, transformers *Transformers) NamedExpression
    MaterializeNamed(ctx context.Context, matCtx *MaterializationContext) (execution.NamedExpression, error)
}

NamedExpressions describes a single named value source.

type NextShuffleMetadataChange Uses

type NextShuffleMetadataChange struct {
    ShuffleIDAddSuffix string
    Partition          int
    Source             Node
}

func NewNextShuffleMetadataChange Uses

func NewNextShuffleMetadataChange(shuffleIDAddSuffix string, partition int, source Node) *NextShuffleMetadataChange

func (*NextShuffleMetadataChange) Materialize Uses

func (node *NextShuffleMetadataChange) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*NextShuffleMetadataChange) Metadata Uses

func (node *NextShuffleMetadataChange) Metadata() *metadata.NodeMetadata

func (*NextShuffleMetadataChange) Transform Uses

func (node *NextShuffleMetadataChange) Transform(ctx context.Context, transformers *Transformers) Node

func (*NextShuffleMetadataChange) Visualize Uses

func (node *NextShuffleMetadataChange) Visualize() *graph.Node

type Node Uses

type Node interface {
    // Transform returns a new Node after recursively calling Transform
    Transform(ctx context.Context, transformers *Transformers) Node
    Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)
    Metadata() *metadata.NodeMetadata
    graph.Visualizer
}

Node describes a single record stream source.

func NewShuffle Uses

func NewShuffle(outputPartitionCount int, strategy ShuffleStrategy, sourceNodes []Node) []Node

type NodeExpression Uses

type NodeExpression struct {
    Node Node
}

NodeExpressions describes an expression which gets it's value from a node underneath.

func NewNodeExpression Uses

func NewNodeExpression(node Node) *NodeExpression

func (*NodeExpression) DoesMatchNamespace Uses

func (ne *NodeExpression) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*NodeExpression) Materialize Uses

func (ne *NodeExpression) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*NodeExpression) Transform Uses

func (ne *NodeExpression) Transform(ctx context.Context, transformers *Transformers) Expression

func (*NodeExpression) Visualize Uses

func (ne *NodeExpression) Visualize() *graph.Node

type Not Uses

type Not struct {
    Child Formula
}

func NewNot Uses

func NewNot(child Formula) *Not

func (*Not) DoesMatchNamespace Uses

func (f *Not) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*Not) ExtractPredicates Uses

func (f *Not) ExtractPredicates() []*Predicate

func (*Not) Materialize Uses

func (f *Not) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Formula, error)

func (*Not) SplitByAnd Uses

func (f *Not) SplitByAnd() []Formula

func (*Not) Transform Uses

func (f *Not) Transform(ctx context.Context, transformers *Transformers) Formula

func (*Not) Visualize Uses

func (f *Not) Visualize() *graph.Node

type Or Uses

type Or struct {
    Left, Right Formula
}

func NewOr Uses

func NewOr(left Formula, right Formula) *Or

func (*Or) DoesMatchNamespace Uses

func (f *Or) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*Or) ExtractPredicates Uses

func (f *Or) ExtractPredicates() []*Predicate

func (*Or) Materialize Uses

func (f *Or) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Formula, error)

func (*Or) SplitByAnd Uses

func (f *Or) SplitByAnd() []Formula

func (*Or) Transform Uses

func (f *Or) Transform(ctx context.Context, transformers *Transformers) Formula

func (*Or) Visualize Uses

func (f *Or) Visualize() *graph.Node

type OrderBy Uses

type OrderBy struct {
    Expressions []Expression
    Directions  []OrderDirection
    Source      Node
}

func NewOrderBy Uses

func NewOrderBy(expressions []Expression, directions []OrderDirection, source Node) *OrderBy

func (*OrderBy) Materialize Uses

func (node *OrderBy) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*OrderBy) Metadata Uses

func (node *OrderBy) Metadata() *metadata.NodeMetadata

func (*OrderBy) Transform Uses

func (node *OrderBy) Transform(ctx context.Context, transformers *Transformers) Node

func (*OrderBy) Visualize Uses

func (node *OrderBy) Visualize() *graph.Node

type OrderDirection Uses

type OrderDirection string
const (
    Ascending  OrderDirection = "asc"
    Descending OrderDirection = "desc"
)

type OutputOptions Uses

type OutputOptions struct {
    OrderByExpressions []Expression
    OrderByDirections  []OrderDirection
    Limit              Expression
    Offset             Expression
}

func NewOutputOptions Uses

func NewOutputOptions(
    orderByExpressions []Expression,
    orderByDirections []OrderDirection,
    limit Expression,
    offset Expression,
) *OutputOptions

func (*OutputOptions) Materialize Uses

func (opts *OutputOptions) Materialize(ctx context.Context, matCtx *MaterializationContext) (*execution.OutputOptions, error)

type Predicate Uses

type Predicate struct {
    Left     Expression
    Relation Relation
    Right    Expression
}

func NewPredicate Uses

func NewPredicate(left Expression, relation Relation, right Expression) *Predicate

func (*Predicate) DoesMatchNamespace Uses

func (f *Predicate) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*Predicate) ExtractPredicates Uses

func (f *Predicate) ExtractPredicates() []*Predicate

func (*Predicate) Materialize Uses

func (f *Predicate) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Formula, error)

func (*Predicate) SplitByAnd Uses

func (f *Predicate) SplitByAnd() []Formula

func (*Predicate) Transform Uses

func (f *Predicate) Transform(ctx context.Context, transformers *Transformers) Formula

func (*Predicate) Visualize Uses

func (f *Predicate) Visualize() *graph.Node

type RecordExpression Uses

type RecordExpression struct {
}

func (*RecordExpression) DoesMatchNamespace Uses

func (r *RecordExpression) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*RecordExpression) Materialize Uses

func (r *RecordExpression) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*RecordExpression) Transform Uses

func (r *RecordExpression) Transform(ctx context.Context, transformers *Transformers) Expression

func (*RecordExpression) Visualize Uses

func (r *RecordExpression) Visualize() *graph.Node

type Relation Uses

type Relation string

Relation describes a comparison operator.

const (
    Equal        Relation = "equal"
    NotEqual     Relation = "not_equal"
    MoreThan     Relation = "more_than"
    LessThan     Relation = "less_than"
    Like         Relation = "like"
    In           Relation = "in"
    NotIn        Relation = "not_in"
    GreaterEqual Relation = "greater_equal"
    LessEqual    Relation = "less_equal"
    Regexp       Relation = "regexp"
)

func NewRelation Uses

func NewRelation(relation string) Relation

func (Relation) Materialize Uses

func (rel Relation) Materialize(ctx context.Context, matCtx *MaterializationContext) execution.Relation

type Requalifier Uses

type Requalifier struct {
    Qualifier string
    Source    Node
}

func NewRequalifier Uses

func NewRequalifier(qualifier string, child Node) *Requalifier

func (*Requalifier) Materialize Uses

func (node *Requalifier) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*Requalifier) Metadata Uses

func (node *Requalifier) Metadata() *metadata.NodeMetadata

func (*Requalifier) Transform Uses

func (node *Requalifier) Transform(ctx context.Context, transformers *Transformers) Node

func (*Requalifier) Visualize Uses

func (node *Requalifier) Visualize() *graph.Node

type Shuffle Uses

type Shuffle struct {
    OutputPartitionCount int
    Strategy             ShuffleStrategy
    Sources              []Node
}

func (*Shuffle) Materialize Uses

func (node *Shuffle) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*Shuffle) Metadata Uses

func (node *Shuffle) Metadata() *metadata.NodeMetadata

func (*Shuffle) Transform Uses

func (node *Shuffle) Transform(ctx context.Context, transformers *Transformers) Node

func (*Shuffle) Visualize Uses

func (node *Shuffle) Visualize() *graph.Node

type ShuffleStrategy Uses

type ShuffleStrategy interface {
    Transform(ctx context.Context, transformers *Transformers) ShuffleStrategy
    Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.ShuffleStrategyPrototype, error)
    Visualize() *graph.Node
}

func NewConstantStrategy Uses

func NewConstantStrategy(partition int) ShuffleStrategy

func NewKeyHashingStrategy Uses

func NewKeyHashingStrategy(key []Expression) ShuffleStrategy

type StarExpression Uses

type StarExpression struct {
    Qualifier string
}

func NewStarExpression Uses

func NewStarExpression(qualifier string) *StarExpression

func (*StarExpression) DoesMatchNamespace Uses

func (se *StarExpression) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*StarExpression) ExpressionName Uses

func (se *StarExpression) ExpressionName() octosql.VariableName

func (*StarExpression) Materialize Uses

func (se *StarExpression) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*StarExpression) MaterializeNamed Uses

func (se *StarExpression) MaterializeNamed(ctx context.Context, matCtx *MaterializationContext) (execution.NamedExpression, error)

func (*StarExpression) Transform Uses

func (se *StarExpression) Transform(ctx context.Context, transformers *Transformers) Expression

func (*StarExpression) TransformNamed Uses

func (se *StarExpression) TransformNamed(ctx context.Context, transformers *Transformers) NamedExpression

func (*StarExpression) Visualize Uses

func (se *StarExpression) Visualize() *graph.Node

type StreamJoin Uses

type StreamJoin struct {
    Source         Node
    Joined         Node
    SourceKey      []Expression
    JoinedKey      []Expression
    EventTimeField octosql.VariableName
    JoinType       execution.JoinType
    Triggers       []Trigger
}

func NewStreamJoin Uses

func NewStreamJoin(source, joined Node, sourceKey, joinedKey []Expression, eventTimeField octosql.VariableName, joinType execution.JoinType, triggers []Trigger) *StreamJoin

func (*StreamJoin) Materialize Uses

func (node *StreamJoin) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*StreamJoin) Metadata Uses

func (node *StreamJoin) Metadata() *metadata.NodeMetadata

func (*StreamJoin) Transform Uses

func (node *StreamJoin) Transform(ctx context.Context, transformers *Transformers) Node

func (*StreamJoin) Visualize Uses

func (node *StreamJoin) Visualize() *graph.Node

type StubNode Uses

type StubNode struct {
    NodeMetadata *metadata.NodeMetadata
}

func NewStubNode Uses

func NewStubNode(metadata *metadata.NodeMetadata) *StubNode

func (*StubNode) Materialize Uses

func (s *StubNode) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*StubNode) Metadata Uses

func (s *StubNode) Metadata() *metadata.NodeMetadata

func (*StubNode) Transform Uses

func (s *StubNode) Transform(ctx context.Context, transformers *Transformers) Node

func (*StubNode) Visualize Uses

func (s *StubNode) Visualize() *graph.Node

type TableValuedFunction Uses

type TableValuedFunction struct {
    Name      string
    Arguments map[octosql.VariableName]TableValuedFunctionArgumentValue
}

func NewTableValuedFunction Uses

func NewTableValuedFunction(name string, args map[octosql.VariableName]TableValuedFunctionArgumentValue) *TableValuedFunction

func (*TableValuedFunction) Materialize Uses

func (node *TableValuedFunction) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Node, error)

func (*TableValuedFunction) Metadata Uses

func (node *TableValuedFunction) Metadata() *metadata.NodeMetadata

TODO: fix Namespace here

func (*TableValuedFunction) Transform Uses

func (node *TableValuedFunction) Transform(ctx context.Context, transformers *Transformers) Node

func (*TableValuedFunction) Visualize Uses

func (node *TableValuedFunction) Visualize() *graph.Node

type TableValuedFunctionArgumentValue Uses

type TableValuedFunctionArgumentValue interface {
    Transform(ctx context.Context, transformers *Transformers) TableValuedFunctionArgumentValue
    graph.Visualizer
    // contains filtered or unexported methods
}

type TableValuedFunctionArgumentValueDescriptor Uses

type TableValuedFunctionArgumentValueDescriptor struct {
    Descriptor octosql.VariableName
}

func NewTableValuedFunctionArgumentValueDescriptor Uses

func NewTableValuedFunctionArgumentValueDescriptor(descriptor octosql.VariableName) *TableValuedFunctionArgumentValueDescriptor

func (*TableValuedFunctionArgumentValueDescriptor) Transform Uses

func (arg *TableValuedFunctionArgumentValueDescriptor) Transform(ctx context.Context, transformers *Transformers) TableValuedFunctionArgumentValue

func (*TableValuedFunctionArgumentValueDescriptor) Visualize Uses

func (arg *TableValuedFunctionArgumentValueDescriptor) Visualize() *graph.Node

type TableValuedFunctionArgumentValueExpression Uses

type TableValuedFunctionArgumentValueExpression struct {
    Expression Expression
}

func NewTableValuedFunctionArgumentValueExpression Uses

func NewTableValuedFunctionArgumentValueExpression(expression Expression) *TableValuedFunctionArgumentValueExpression

func (*TableValuedFunctionArgumentValueExpression) Transform Uses

func (arg *TableValuedFunctionArgumentValueExpression) Transform(ctx context.Context, transformers *Transformers) TableValuedFunctionArgumentValue

func (*TableValuedFunctionArgumentValueExpression) Visualize Uses

func (arg *TableValuedFunctionArgumentValueExpression) Visualize() *graph.Node

type TableValuedFunctionArgumentValueTable Uses

type TableValuedFunctionArgumentValueTable struct {
    Source Node
}

func NewTableValuedFunctionArgumentValueTable Uses

func NewTableValuedFunctionArgumentValueTable(source Node) *TableValuedFunctionArgumentValueTable

func (*TableValuedFunctionArgumentValueTable) Transform Uses

func (arg *TableValuedFunctionArgumentValueTable) Transform(ctx context.Context, transformers *Transformers) TableValuedFunctionArgumentValue

func (*TableValuedFunctionArgumentValueTable) Visualize Uses

func (arg *TableValuedFunctionArgumentValueTable) Visualize() *graph.Node

type Transformers Uses

type Transformers struct {
    NodeT                             func(Node) Node
    ExprT                             func(Expression) Expression
    NamedExprT                        func(NamedExpression) NamedExpression
    FormulaT                          func(Formula) Formula
    TableValuedFunctionArgumentValueT func(TableValuedFunctionArgumentValue) TableValuedFunctionArgumentValue
    TriggerT                          func(Trigger) Trigger
    ShuffleStrategyT                  func(ShuffleStrategy) ShuffleStrategy
}

Transformers is a structure containing functions to transform each of the physical plan components.

type Trigger Uses

type Trigger interface {
    // Transform returns a new Expression after recursively calling Transform
    Transform(ctx context.Context, transformers *Transformers) Trigger
    Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.TriggerPrototype, error)
    graph.Visualizer
}

type Tuple Uses

type Tuple struct {
    Expressions []Expression
}

TupleExpression describes an expression which is a tuple of subexpressions.

func NewTuple Uses

func NewTuple(expressions []Expression) *Tuple

func (*Tuple) DoesMatchNamespace Uses

func (tup *Tuple) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*Tuple) Materialize Uses

func (tup *Tuple) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*Tuple) Transform Uses

func (tup *Tuple) Transform(ctx context.Context, transformers *Transformers) Expression

func (*Tuple) Visualize Uses

func (tup *Tuple) Visualize() *graph.Node

type Variable Uses

type Variable struct {
    Name octosql.VariableName
}

Variables describes a variable name.

func NewVariable Uses

func NewVariable(name octosql.VariableName) *Variable

func (*Variable) DoesMatchNamespace Uses

func (v *Variable) DoesMatchNamespace(namespace *metadata.Namespace) bool

func (*Variable) ExpressionName Uses

func (v *Variable) ExpressionName() octosql.VariableName

func (*Variable) Materialize Uses

func (v *Variable) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.Expression, error)

func (*Variable) MaterializeNamed Uses

func (v *Variable) MaterializeNamed(ctx context.Context, matCtx *MaterializationContext) (execution.NamedExpression, error)

func (*Variable) Transform Uses

func (v *Variable) Transform(ctx context.Context, transformers *Transformers) Expression

func (*Variable) TransformNamed Uses

func (v *Variable) TransformNamed(ctx context.Context, transformers *Transformers) NamedExpression

func (*Variable) Visualize Uses

func (v *Variable) Visualize() *graph.Node

type WatermarkTrigger Uses

type WatermarkTrigger struct {
}

func NewWatermarkTrigger Uses

func NewWatermarkTrigger() *WatermarkTrigger

func (*WatermarkTrigger) Materialize Uses

func (c *WatermarkTrigger) Materialize(ctx context.Context, matCtx *MaterializationContext) (execution.TriggerPrototype, error)

func (*WatermarkTrigger) Transform Uses

func (c *WatermarkTrigger) Transform(ctx context.Context, transformers *Transformers) Trigger

func (*WatermarkTrigger) Visualize Uses

func (c *WatermarkTrigger) Visualize() *graph.Node

Directories

PathSynopsis
matcher
metadata
optimizer

Package physical imports 15 packages (graph) and is imported by 20 packages. Updated 2020-08-03. Refresh now. Tools for package owners.