aggregation

package
v0.0.0-...-23e8124 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregation

type Aggregation struct {
	AggregationType AggregationType `json:"type"`
	Name            string          `json:"name"`
	FieldName       string          `json:"fieldName"`
	MaxStringBytes  int             `json:"maxStringBytes,omitempty"`
}

all the rests aggregators are modeled here

func (Aggregation) Type

func (s Aggregation) Type() string

type AggregationType

type AggregationType int
const (
	Count AggregationType = iota
	LongSum
	DoubleSum
	FloatSum
	DoubleMin
	DoubleMax
	FloatMin
	FloatMax
	LongMin
	LongMax
	DoubleMean
	DoubleFirst
	DoubleLast
	FloatFirst
	FloatLast
	LongFirst
	LongLast
	StringFirst
	StringLast
	DoubleAny
	FloatAny
	LongAny
	StringAny
	Javascript
	ThetaSketch
	Filtered
)

func (AggregationType) MarshalJSON

func (a AggregationType) MarshalJSON() ([]byte, error)

func (AggregationType) Name

func (a AggregationType) Name() string

func (AggregationType) Ordinal

func (a AggregationType) Ordinal() int

func (AggregationType) Values

func (a AggregationType) Values() *[]string

type Aggregator

type Aggregator interface {
	Type() string
}

type FilteredAggregation

type FilteredAggregation struct {
	AggregationType AggregationType `json:"type"`
	Aggregator      Aggregator      `json:"aggregator"`
	Filter          filter.Filter   `json:"filter"`
}

func (FilteredAggregation) Type

func (f FilteredAggregation) Type() string

type JavascriptAggregation

type JavascriptAggregation struct {
	AggregationType AggregationType `json:"type"`
	Name            string          `json:"name"`
	FieldNames      []string        `json:"fieldNames"`
	AggregationFn   string          `json:"fnAggregate"`
	CombineFn       string          `json:"fnCombine"`
	ResetFn         string          `json:"fnReset"`
}

func (JavascriptAggregation) Type

func (j JavascriptAggregation) Type() string

Jump to

Keyboard shortcuts

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