Documentation ¶
Index ¶
- Variables
- func NewNopCompilePlanner() *nopCompilePlanner
- type Aggregable
- type AggregateFunctionType
- type AggregationBuffer
- type CompilePlanner
- type ContainsExpressions
- type FilteredRelation
- type IdentifiableByName
- type PlanExpression
- type PlanOperator
- type PlannerColumn
- type Relation
- type Row
- type RowIterable
- type RowIterator
- type Rows
- type Schema
Constants ¶
This section is empty.
Variables ¶
var ErrNoMoreRows = errors.New("ErrNoMoreRows")
ErrNoMoreRows is a 'special' error returned to signify no more rows
Functions ¶
func NewNopCompilePlanner ¶
func NewNopCompilePlanner() *nopCompilePlanner
Types ¶
type Aggregable ¶
type Aggregable interface { fmt.Stringer NewBuffer() (AggregationBuffer, error) AggType() AggregateFunctionType AggExpression() PlanExpression AggAdditionalExpr() []PlanExpression Type() parser.ExprDataType }
interface to an expression that is a an aggregate
type AggregateFunctionType ¶
type AggregateFunctionType int
TODO(pok) we can get rid of this - we have expression types for all of these now...
const ( // Special tokens AGGREGATE_ILLEGAL AggregateFunctionType = iota AGGREGATE_COUNT AGGREGATE_COUNT_DISTINCT AGGREGATE_SUM AGGREGATE_AVG AGGREGATE_PERCENTILE AGGREGATE_MIN AGGREGATE_MAX )
The list of AggregateFunction.
type AggregationBuffer ¶
type AggregationBuffer interface { Eval(ctx context.Context) (interface{}, error) Update(ctx context.Context, row Row) error }
Aggregattion buffer is an interface to something that maintains an aggregate during query execution
type CompilePlanner ¶
type ContainsExpressions ¶
type ContainsExpressions interface { // returns the list of expressions contained by the plan operator Expressions() []PlanExpression // WithUpdatedExpressions returns a the operator with expressions updated WithUpdatedExpressions(exprs ...PlanExpression) (PlanOperator, error) }
ContainsExpressions exposes expressions in plan operators
type FilteredRelation ¶
type FilteredRelation interface { Relation UpdateFilters(filterCondition PlanExpression) (PlanOperator, error) }
FilteredRelation is an interface to something that can be treated as a relation that can be filtered
type IdentifiableByName ¶
type IdentifiableByName interface {
Name() string
}
interface to something that can be identified by a name
type PlanExpression ¶
type PlanExpression interface { fmt.Stringer // evaluates expression based on current row Evaluate(currentRow []interface{}) (interface{}, error) // returns the type of the expression Type() parser.ExprDataType // returns the child expressions for this expression Children() []PlanExpression // creates a new expression node with the children replaced WithChildren(children ...PlanExpression) (PlanExpression, error) // returns a map containing a rich description of this expression; intended to be // marshalled into json Plan() map[string]interface{} }
PlanExpression is an expression node for an execution plan
type PlanOperator ¶
type PlanOperator interface { fmt.Stringer // Children of this operator. Children() []PlanOperator // Schema of this operator. Schema() Schema // Iterator produces an iterator from this node. The current row being // evaluated is provided, as well as the context of the query. Iterator(ctx context.Context, row Row) (RowIterator, error) // WithChildren creates a new node with the children passed WithChildren(children ...PlanOperator) (PlanOperator, error) // Plan returns a map containing a rich description of this operator; // intended to be marshalled into json. Plan() map[string]interface{} // AddWarning adds a warning to the plan. AddWarning(warning string) // Warnings returns a list of warnings as strings. Warnings() []string }
PlanOperator is a node in an execution plan.
type PlannerColumn ¶
type PlannerColumn struct { ColumnName string RelationName string AliasName string Type parser.ExprDataType }
PlannerColumn is the definition of a column returned as a set from each operator
type Relation ¶
type Relation interface {
Name() string
}
Relation is an interface to something that can be treated as a relation
type RowIterable ¶
type RowIterable interface {
Iterator(ctx context.Context, row Row) (RowIterator, error)
}
type RowIterator ¶
RowIterator is an iterator that produces rows (or an error)