octosql: github.com/cube2222/octosql/logical Index | Files

package logical

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

Index

Package Files

distinct.go filter.go function.go group_by.go interval.go join.go logic.go logical.go map.go order_by.go relation.go requalifier.go tvf.go union_all.go union_distinct.go utils.go with.go

Variables

var AggregateFunctions = map[Aggregate]struct{}{
    Avg:           {},
    AvgDistinct:   {},
    Count:         {},
    CountDistinct: {},
    First:         {},
    Last:          {},
    Max:           {},
    Key:           {},
    Min:           {},
    Sum:           {},
    SumDistinct:   {},
}
var ErrFallbackToLookupJoin = errors.New("fallback to lookup join")

func EqualExpressions Uses

func EqualExpressions(expr1, expr2 Expression) error

func EqualFormula Uses

func EqualFormula(expr1, expr2 Formula) error

func EqualNodes Uses

func EqualNodes(node1, node2 Node) error

func EqualTableValuedFunctionArgumentValue Uses

func EqualTableValuedFunctionArgumentValue(value1 TableValuedFunctionArgumentValue, value2 TableValuedFunctionArgumentValue) error

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"
)

type AliasedExpression Uses

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

func (*AliasedExpression) Name Uses

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

func (*AliasedExpression) Physical Uses

func (alExpr *AliasedExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*AliasedExpression) PhysicalNamed Uses

func (alExpr *AliasedExpression) PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)

func (*AliasedExpression) Visualize Uses

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

type BooleanConstant Uses

type BooleanConstant struct {
    Value bool
}

func NewBooleanConstant Uses

func NewBooleanConstant(value bool) *BooleanConstant

func (*BooleanConstant) Physical Uses

func (f *BooleanConstant) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

func (*BooleanConstant) Visualize Uses

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

type Constant Uses

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

func NewConstant Uses

func NewConstant(value interface{}) *Constant

func (*Constant) Physical Uses

func (c *Constant) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*Constant) Visualize Uses

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

type CountingTrigger Uses

type CountingTrigger struct {
    Count Expression
}

func NewCountingTrigger Uses

func NewCountingTrigger(count Expression) *CountingTrigger

func (*CountingTrigger) Physical Uses

func (w *CountingTrigger) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Trigger, octosql.Variables, error)

func (*CountingTrigger) Visualize Uses

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

type DataSource Uses

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

func NewDataSource Uses

func NewDataSource(name string, alias string) *DataSource

func (*DataSource) Physical Uses

func (ds *DataSource) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*DataSource) Visualize Uses

func (ds *DataSource) Visualize() *graph.Node

type DelayTrigger Uses

type DelayTrigger struct {
    Delay Expression
}

func NewDelayTrigger Uses

func NewDelayTrigger(delay Expression) *DelayTrigger

func (*DelayTrigger) Physical Uses

func (w *DelayTrigger) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Trigger, octosql.Variables, error)

func (*DelayTrigger) Visualize Uses

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

type Distinct Uses

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

func NewDistinct Uses

func NewDistinct(child Node) *Distinct

func (*Distinct) Physical Uses

func (node *Distinct) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*Distinct) Visualize Uses

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

type Expression Uses

type Expression interface {
    graph.Visualizer

    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)
}

type Filter Uses

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

func NewFilter Uses

func NewFilter(formula Formula, child Node) *Filter

func (*Filter) Physical Uses

func (node *Filter) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*Filter) Visualize Uses

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

type Formula Uses

type Formula interface {
    graph.Visualizer

    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)
}

type FunctionExpression Uses

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

func NewFunctionExpression Uses

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

func (*FunctionExpression) Physical Uses

func (fe *FunctionExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*FunctionExpression) Visualize Uses

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

type GroupBy Uses

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

func NewGroupBy Uses

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

func (*GroupBy) Physical Uses

func (node *GroupBy) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*GroupBy) Visualize Uses

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

type InfixOperator Uses

type InfixOperator struct {
    Left     Formula
    Operator string
    Right    Formula
}

func NewInfixOperator Uses

func NewInfixOperator(left Formula, right Formula, operator string) *InfixOperator

func (*InfixOperator) Physical Uses

func (f *InfixOperator) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

func (*InfixOperator) Visualize Uses

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

type Interval Uses

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

func NewInterval Uses

func NewInterval(count Expression, unit Expression) *Interval

func (*Interval) Physical Uses

func (v *Interval) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*Interval) Visualize Uses

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

type Join Uses

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

func NewJoin Uses

func NewJoin(source, joined Node, joinType execution.JoinType) *Join

func (*Join) Physical Uses

func (node *Join) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*Join) Visualize Uses

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

func (*Join) WithTriggers Uses

func (node *Join) WithTriggers(triggers []Trigger) *Join

type LogicExpression Uses

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

func NewLogicExpression Uses

func NewLogicExpression(formula Formula) *LogicExpression

func (*LogicExpression) Physical Uses

func (le *LogicExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*LogicExpression) Visualize Uses

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

type Map Uses

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

func NewMap Uses

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

func (*Map) Physical Uses

func (node *Map) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*Map) Visualize Uses

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

type NamedExpression Uses

type NamedExpression interface {
    Expression
    Name() octosql.VariableName
    PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)
}

func NewAliasedExpression Uses

func NewAliasedExpression(name octosql.VariableName, expr Expression) NamedExpression

type Node Uses

type Node interface {
    graph.Visualizer

    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)
}

type NodeExpression Uses

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

func NewNodeExpression Uses

func NewNodeExpression(node Node) *NodeExpression

func (*NodeExpression) Physical Uses

func (ne *NodeExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*NodeExpression) Visualize Uses

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

type OrderBy Uses

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

func NewOrderBy Uses

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

func (*OrderBy) Physical Uses

func (node *OrderBy) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*OrderBy) Visualize Uses

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

type OrderDirection Uses

type OrderDirection string

type OutputOptions Uses

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

func (*OutputOptions) Physical Uses

func (opts *OutputOptions) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (*physical.OutputOptions, octosql.Variables, error)

type PhysicalPlanCreator Uses

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

func NewPhysicalPlanCreator Uses

func NewPhysicalPlanCreator(repo *physical.DataSourceRepository, physicalConfig map[string]interface{}) *PhysicalPlanCreator

func (*PhysicalPlanCreator) GetVariableName Uses

func (creator *PhysicalPlanCreator) GetVariableName() (out octosql.VariableName)

func (*PhysicalPlanCreator) WithCommonTableExpression Uses

func (creator *PhysicalPlanCreator) WithCommonTableExpression(name string, nodes []physical.Node) *PhysicalPlanCreator

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) Physical Uses

func (f *Predicate) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

func (*Predicate) Visualize Uses

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

type PrefixOperator Uses

type PrefixOperator struct {
    Child    Formula
    Operator string
}

func NewPrefixOperator Uses

func NewPrefixOperator(child Formula, operator string) *PrefixOperator

func (*PrefixOperator) Physical Uses

func (f *PrefixOperator) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Formula, octosql.Variables, error)

func (*PrefixOperator) Visualize Uses

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

type Relation Uses

type Relation string
const (
    Equal        Relation = "="
    NotEqual     Relation = "!="
    MoreThan     Relation = ">"
    LessThan     Relation = "<"
    Like         Relation = "like"
    In           Relation = "in"
    NotIn        Relation = "not in"
    GreaterEqual Relation = ">="
    LessEqual    Relation = "<="
    Regexp       Relation = "regexp"
)

func NewRelation Uses

func NewRelation(relation string) Relation

func (Relation) Physical Uses

func (rel Relation) Physical(ctx context.Context) (physical.Relation, error)

type Requalifier Uses

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

func NewRequalifier Uses

func NewRequalifier(qualifier string, child Node) *Requalifier

func (*Requalifier) Physical Uses

func (node *Requalifier) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (Requalifier) Visualize Uses

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

type StarExpression Uses

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

func NewStarExpression Uses

func NewStarExpression(qualifier string) *StarExpression

func (*StarExpression) Name Uses

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

func (*StarExpression) Physical Uses

func (se *StarExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*StarExpression) PhysicalNamed Uses

func (se *StarExpression) PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)

func (*StarExpression) Visualize Uses

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

type TableValuedFunction Uses

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

func NewTableValuedFunction Uses

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

func (*TableValuedFunction) Physical Uses

func (node *TableValuedFunction) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*TableValuedFunction) Visualize Uses

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

type TableValuedFunctionArgumentValue Uses

type TableValuedFunctionArgumentValue interface {
    graph.Visualizer

    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.TableValuedFunctionArgumentValue, octosql.Variables, error)
    // contains filtered or unexported methods
}

type TableValuedFunctionArgumentValueDescriptor Uses

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

func NewTableValuedFunctionArgumentValueDescriptor Uses

func NewTableValuedFunctionArgumentValueDescriptor(descriptor octosql.VariableName) *TableValuedFunctionArgumentValueDescriptor

func (*TableValuedFunctionArgumentValueDescriptor) Physical Uses

func (arg *TableValuedFunctionArgumentValueDescriptor) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.TableValuedFunctionArgumentValue, octosql.Variables, error)

func (*TableValuedFunctionArgumentValueDescriptor) Visualize Uses

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

type TableValuedFunctionArgumentValueExpression Uses

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

func NewTableValuedFunctionArgumentValueExpression Uses

func NewTableValuedFunctionArgumentValueExpression(expression Expression) *TableValuedFunctionArgumentValueExpression

func (*TableValuedFunctionArgumentValueExpression) Physical Uses

func (arg *TableValuedFunctionArgumentValueExpression) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.TableValuedFunctionArgumentValue, octosql.Variables, error)

func (*TableValuedFunctionArgumentValueExpression) Visualize Uses

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

type TableValuedFunctionArgumentValueTable Uses

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

func NewTableValuedFunctionArgumentValueTable Uses

func NewTableValuedFunctionArgumentValueTable(source Node) *TableValuedFunctionArgumentValueTable

func (*TableValuedFunctionArgumentValueTable) Physical Uses

func (arg *TableValuedFunctionArgumentValueTable) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.TableValuedFunctionArgumentValue, octosql.Variables, error)

func (*TableValuedFunctionArgumentValueTable) Visualize Uses

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

type Trigger Uses

type Trigger interface {
    Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Trigger, octosql.Variables, error)
    Visualize() *graph.Node
}

type Tuple Uses

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

func NewTuple Uses

func NewTuple(expressions []Expression) *Tuple

func (*Tuple) Physical Uses

func (tup *Tuple) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*Tuple) Visualize Uses

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

type UnionAll Uses

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

func NewUnionAll Uses

func NewUnionAll(first, second Node) *UnionAll

func (*UnionAll) Physical Uses

func (node *UnionAll) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*UnionAll) Visualize Uses

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

type UnionDistinct Uses

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

func NewUnionDistinct Uses

func NewUnionDistinct(first, second Node) *UnionDistinct

func (*UnionDistinct) Physical Uses

func (node *UnionDistinct) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*UnionDistinct) Visualize Uses

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

type Variable Uses

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

func NewVariable Uses

func NewVariable(name octosql.VariableName) *Variable

func (*Variable) Name Uses

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

func (*Variable) Physical Uses

func (v *Variable) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Expression, octosql.Variables, error)

func (*Variable) PhysicalNamed Uses

func (v *Variable) PhysicalNamed(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.NamedExpression, octosql.Variables, error)

func (*Variable) Visualize Uses

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

type WatermarkTrigger Uses

type WatermarkTrigger struct {
}

func NewWatermarkTrigger Uses

func NewWatermarkTrigger() *WatermarkTrigger

func (*WatermarkTrigger) Physical Uses

func (w *WatermarkTrigger) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) (physical.Trigger, octosql.Variables, error)

func (*WatermarkTrigger) Visualize Uses

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

type With Uses

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

func NewWith Uses

func NewWith(cteNames []string, cteNodes []Node, source Node) *With

func (*With) Physical Uses

func (node *With) Physical(ctx context.Context, physicalCreator *PhysicalPlanCreator) ([]physical.Node, octosql.Variables, error)

func (*With) Visualize Uses

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

Package logical imports 14 packages (graph) and is imported by 3 packages. Updated 2020-09-20. Refresh now. Tools for package owners.