Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateOp ¶
type AggregateOp struct {
Dimensions ast.Dimensions
}
func (*AggregateOp) Apply ¶
func (p *AggregateOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}
Apply
input: Collection * output: Collection
type AnalyticFuncsOp ¶
func (*AnalyticFuncsOp) Apply ¶
func (p *AnalyticFuncsOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) (got interface{})
type EmitterOp ¶
type EmitterOp struct {
Emitter string
}
EmitterOp set the emitter to the stream name It is only planned after shared connection node in which the emitter is not determined in the source side
func (*EmitterOp) Apply ¶
func (p *EmitterOp) Apply(ctx api.StreamContext, data any, _ *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) any
type FilterOp ¶
func (*FilterOp) Apply ¶
func (p *FilterOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}
Apply the filter operator to each message in the stream The input data could be a xsql.Row or a xsql.Collection For xsql.Row, apply the condition to the row and return the row if the condition is true For xsql.Collection, apply the condition to each row and return the rows that meet the condition If error happens, return the error
type FuncOp ¶
func (*FuncOp) Apply ¶
func (p *FuncOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}
type HavingOp ¶
func (*HavingOp) Apply ¶
func (p *HavingOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}
type JoinOp ¶
JoinOp 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{}
Apply JoinOp to join two streams. If running in continuous query, the inner join will always return empty result because there is only one stream data.
type OrderOp ¶
type OrderOp struct {
SortFields ast.SortFields
}
func (*OrderOp) Apply ¶
func (p *OrderOp) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}
type Preprocessor ¶
type Preprocessor struct {
// contains filtered or unexported fields
}
Preprocessor only planned when 1. eventTime, to convert the timestamp field 2. schema validate and convert, when strict_validation is on and field type is not binary Do not convert types
func NewPreprocessor ¶
func (*Preprocessor) Apply ¶
func (p *Preprocessor) Apply(ctx api.StreamContext, data interface{}, _ *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}
Apply the preprocessor to the tuple
input: *xsql.Tuple * output: *xsql.Tuple
type ProjectOp ¶
type ProjectOp struct { ColNames [][]string // list of [col, table] AliasNames []string // list of alias name ExprNames []string // list of expr name ExceptNames []string // list of except name AllWildcard bool WildcardEmitters map[string]bool AliasFields ast.Fields ExprFields ast.Fields IsAggregate bool // Whether the project is used in an aggregate context. This is set by planner by analyzing the SQL query EnableLimit bool LimitCount int 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{}
Apply
input: *xsql.Tuple| xsql.Collection
output: []map[string]interface{}
type ProjectSetOperator ¶
func (*ProjectSetOperator) Apply ¶
func (ps *ProjectSetOperator) Apply(ctx api.StreamContext, data interface{}, _ *xsql.FunctionValuer, _ *xsql.AggregateFunctionValuer) interface{}
Apply implement UnOperation ProjectSetOperator will extract the results from the set-returning-function into multi rows by aligning other columns For tuple, ProjectSetOperator will do the following transform: {"a":[1,2],"b":3} => {"a":1,"b":3},{"a":2,"b":3} For Collection, ProjectSetOperator will do the following transform: [{"a":[1,2],"b":3},{"a":[1,2],"b":4}] = > [{"a":"1","b":3},{"a":"2","b":3},{"a":"1","b":4},{"a":"2","b":4}]
type WindowFuncOperator ¶
func (*WindowFuncOperator) Apply ¶
func (wf *WindowFuncOperator) Apply(ctx api.StreamContext, data interface{}, fv *xsql.FunctionValuer, afv *xsql.AggregateFunctionValuer) interface{}