Documentation ¶
Index ¶
- Variables
- func DistinctAggregateOverloads(overloads []physical.AggregateDescriptor) []physical.AggregateDescriptor
- func NewArrayPrototype() func() nodes.Aggregate
- func NewAverageDurationPrototype() func() nodes.Aggregate
- func NewAverageFloatPrototype() func() nodes.Aggregate
- func NewAverageIntPrototype() func() nodes.Aggregate
- func NewCountPrototype() func() nodes.Aggregate
- func NewDistinctPrototype(wrapped func() nodes.Aggregate) func() nodes.Aggregate
- func NewMaxPrototype() func() nodes.Aggregate
- func NewMinPrototype() func() nodes.Aggregate
- func NewSumDurationPrototype() func() nodes.Aggregate
- func NewSumFloatPrototype() func() nodes.Aggregate
- func NewSumIntPrototype() func() nodes.Aggregate
- type Array
- type AverageDuration
- type AverageFloat
- type AverageInt
- type Count
- type Distinct
- type Max
- type Min
- type SumDuration
- type SumFloat
- type SumInt
Constants ¶
This section is empty.
Variables ¶
View Source
var Aggregates = map[string]physical.AggregateDetails{ "array_agg": { Description: "Creates an array of all items in the group.", Descriptors: ArrayOverloads, }, "array_agg_distinct": { Description: "Creates an array of distinct items in the group.", Descriptors: DistinctAggregateOverloads(ArrayOverloads), }, "count": { Description: "Counts all items in the group.", Descriptors: CountOverloads, }, "count_distinct": { Description: "Counts distinct items in the group.", Descriptors: DistinctAggregateOverloads(CountOverloads), }, "sum": { Description: "Sums all items in the group.", Descriptors: SumOverloads, }, "sum_distinct": { Description: "Sums distinct items in the group.", Descriptors: DistinctAggregateOverloads(SumOverloads), }, "avg": { Description: "Averages all items in the group.", Descriptors: AverageOverloads, }, "avg_distinct": { Description: "Averages distinct items in the group.", Descriptors: DistinctAggregateOverloads(AverageOverloads), }, "max": { Description: "Returns maximum item in the group.", Descriptors: MaxOverloads, }, "min": { Description: "Returns minimum item in the group.", Descriptors: MinOverloads, }, }
View Source
var ArrayOverloads = []physical.AggregateDescriptor{ { TypeFn: func(t octosql.Type) (octosql.Type, bool) { return octosql.Type{TypeID: octosql.TypeIDList, List: struct{ Element *octosql.Type }{Element: &t}}, true }, Prototype: NewArrayPrototype(), }, }
View Source
var AverageOverloads = []physical.AggregateDescriptor{ { ArgumentType: octosql.Int, OutputType: octosql.Int, Prototype: NewAverageIntPrototype(), }, { ArgumentType: octosql.Float, OutputType: octosql.Float, Prototype: NewAverageFloatPrototype(), }, { ArgumentType: octosql.Duration, OutputType: octosql.Duration, Prototype: NewAverageDurationPrototype(), }, }
View Source
var CountOverloads = []physical.AggregateDescriptor{ { ArgumentType: octosql.Any, OutputType: octosql.Int, Prototype: NewCountPrototype(), }, }
View Source
var MaxOverloads = []physical.AggregateDescriptor{ { ArgumentType: octosql.Int, OutputType: octosql.Int, Prototype: NewMaxPrototype(), }, { ArgumentType: octosql.Float, OutputType: octosql.Float, Prototype: NewMaxPrototype(), }, { ArgumentType: octosql.Duration, OutputType: octosql.Duration, Prototype: NewMaxPrototype(), }, { ArgumentType: octosql.Time, OutputType: octosql.Time, Prototype: NewMaxPrototype(), }, }
View Source
var MinOverloads = []physical.AggregateDescriptor{ { ArgumentType: octosql.Int, OutputType: octosql.Int, Prototype: NewMinPrototype(), }, { ArgumentType: octosql.Float, OutputType: octosql.Float, Prototype: NewMinPrototype(), }, { ArgumentType: octosql.Duration, OutputType: octosql.Duration, Prototype: NewMinPrototype(), }, }
View Source
var SumOverloads = []physical.AggregateDescriptor{ { ArgumentType: octosql.Int, OutputType: octosql.Int, Prototype: NewSumIntPrototype(), }, { ArgumentType: octosql.Float, OutputType: octosql.Float, Prototype: NewSumFloatPrototype(), }, { ArgumentType: octosql.Duration, OutputType: octosql.Duration, Prototype: NewSumDurationPrototype(), }, }
Functions ¶
func DistinctAggregateOverloads ¶
func DistinctAggregateOverloads(overloads []physical.AggregateDescriptor) []physical.AggregateDescriptor
func NewArrayPrototype ¶
func NewAverageIntPrototype ¶
func NewCountPrototype ¶
func NewDistinctPrototype ¶
func NewMaxPrototype ¶
func NewMinPrototype ¶
func NewSumDurationPrototype ¶
func NewSumFloatPrototype ¶
func NewSumIntPrototype ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
TODO: Elements should be sorted as they come, not sorted by value in a BTree.
type AverageDuration ¶
type AverageDuration struct {
// contains filtered or unexported fields
}
func (*AverageDuration) Add ¶
func (c *AverageDuration) Add(retraction bool, value octosql.Value) bool
func (*AverageDuration) Trigger ¶
func (c *AverageDuration) Trigger() octosql.Value
type AverageFloat ¶
type AverageFloat struct {
// contains filtered or unexported fields
}
func (*AverageFloat) Trigger ¶
func (c *AverageFloat) Trigger() octosql.Value
type AverageInt ¶
type AverageInt struct {
// contains filtered or unexported fields
}
func (*AverageInt) Trigger ¶
func (c *AverageInt) Trigger() octosql.Value
type SumDuration ¶
type SumDuration struct {
// contains filtered or unexported fields
}
func (*SumDuration) Trigger ¶
func (c *SumDuration) Trigger() octosql.Value
Source Files ¶
Click to show internal directories.
Click to hide internal directories.