operators

package
v0.0.0-...-7b16d43 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_FIELD_NAME_PREFIX string = "rengine_field_"

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateOp

type AggregateOp struct {
	Dimensions xsql.Dimensions
	Alias      xsql.Fields
}

func (*AggregateOp) Apply

func (p *AggregateOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}

*

  • input: *xsql.Tuple from preprocessor | xsql.WindowTuplesSet from windowOp | xsql.JoinTupleSets from joinOp
  • output: xsql.GroupedTuplesSet

type FilterOp

type FilterOp struct {
	Condition xsql.Expr
}

func (*FilterOp) Apply

func (p *FilterOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}

*

  • input: *xsql.Tuple from preprocessor | xsql.WindowTuplesSet from windowOp | xsql.JoinTupleSets from joinOp
  • output: *xsql.Tuple | xsql.WindowTuplesSet | xsql.JoinTupleSets

type HavingOp

type HavingOp struct {
	Condition xsql.Expr
}

func (*HavingOp) Apply

func (p *HavingOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}

type JoinOp

type JoinOp struct {
	From  *xsql.Table
	Joins xsql.Joins
}

TODO join expr should only be the equal op between 2 streams like tb1.id = tb2.id

func (*JoinOp) Apply

func (jp *JoinOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}

input: xsql.WindowTuplesSet from windowOp, window is required for join output: xsql.JoinTupleSets

type OrderOp

type OrderOp struct {
	SortFields xsql.SortFields
}

func (*OrderOp) Apply

func (p *OrderOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}

*

  • input: *xsql.Tuple from preprocessor | xsql.WindowTuplesSet from windowOp | xsql.JoinTupleSets from joinOp
  • output: *xsql.Tuple | xsql.WindowTuplesSet | xsql.JoinTupleSets

type Preprocessor

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

func NewPreprocessor

func NewPreprocessor(fields []interface{}, fs xsql.Fields, allMeta bool, metaFields []string, iet bool, timestampField string, timestampFormat string, isBinary bool) (*Preprocessor, error)

func (*Preprocessor) Apply

func (p *Preprocessor) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}

* input: *xsql.Tuple * output: *xsql.Tuple

type ProjectOp

type ProjectOp struct {
	Fields      xsql.Fields
	IsAggregate bool
	SendMeta    bool
	// contains filtered or unexported fields
}

func (*ProjectOp) Apply

func (pp *ProjectOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}

*

  • input: *xsql.Tuple from preprocessor or filterOp | xsql.WindowTuplesSet from windowOp or filterOp | xsql.JoinTupleSets from joinOp or filterOp
  • output: []map[string]interface{}

Jump to

Keyboard shortcuts

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