agg

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxValueSize = 20 * 1024 * 1024

MaxValueSize is a limit on an individual aggregation value since sets and arrays could otherwise grow without limit leading to a single record value that cannot fit in memory.

Variables

View Source
var (
	ErrBadValue      = errors.New("bad value")
	ErrFieldRequired = errors.New("field parameter required")
)

Functions

This section is empty.

Types

type And

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

func (*And) Consume

func (a *And) Consume(v zed.Value) error

func (*And) ConsumeAsPartial

func (a *And) ConsumeAsPartial(v zed.Value) error

func (*And) Result

func (a *And) Result(*zed.Context) (zed.Value, error)

func (*And) ResultAsPartial

func (a *And) ResultAsPartial(*zed.Context) (zed.Value, error)

type Any

type Any zed.Value

func (*Any) Consume

func (a *Any) Consume(v zed.Value) error

func (*Any) ConsumeAsPartial

func (a *Any) ConsumeAsPartial(v zed.Value) error

func (Any) Result

func (a Any) Result(*zed.Context) (zed.Value, error)

func (Any) ResultAsPartial

func (a Any) ResultAsPartial(*zed.Context) (zed.Value, error)

type Avg

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

func (*Avg) Consume

func (a *Avg) Consume(v zed.Value) error

func (*Avg) ConsumeAsPartial

func (a *Avg) ConsumeAsPartial(p zed.Value) error

func (*Avg) Result

func (a *Avg) Result(*zed.Context) (zed.Value, error)

func (*Avg) ResultAsPartial

func (a *Avg) ResultAsPartial(zctx *zed.Context) (zed.Value, error)

type Collect

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

func (*Collect) Consume

func (c *Collect) Consume(v zed.Value) error

func (*Collect) ConsumeAsPartial

func (c *Collect) ConsumeAsPartial(zv zed.Value) error

func (*Collect) Result

func (c *Collect) Result(zctx *zed.Context) (zed.Value, error)

func (*Collect) ResultAsPartial

func (c *Collect) ResultAsPartial(zctx *zed.Context) (zed.Value, error)

type Count

type Count uint64

func (*Count) Consume

func (c *Count) Consume(v zed.Value) error

func (*Count) ConsumeAsPartial

func (c *Count) ConsumeAsPartial(p zed.Value) error

func (Count) Result

func (c Count) Result(*zed.Context) (zed.Value, error)

func (Count) ResultAsPartial

func (c Count) ResultAsPartial(*zed.Context) (zed.Value, error)

type CountDistinct

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

CountDistinct uses hyperloglog to approximate the count of unique values for a field.

func NewCountDistinct

func NewCountDistinct() *CountDistinct

func (*CountDistinct) Consume

func (c *CountDistinct) Consume(v zed.Value) error

func (*CountDistinct) ConsumeAsPartial

func (*CountDistinct) ConsumeAsPartial(v zed.Value) error

func (*CountDistinct) Result

func (c *CountDistinct) Result(*zed.Context) (zed.Value, error)

func (*CountDistinct) ResultAsPartial

func (*CountDistinct) ResultAsPartial(zctx *zed.Context) (zed.Value, error)

type Duration

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

func NewDuration

func NewDuration(f *anymath.Function) *Duration

type Float64

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

func NewFloat64

func NewFloat64(f *anymath.Function) *Float64

type Function

type Function interface {
	Consume(zed.Value) error
	ConsumeAsPartial(zed.Value) error
	Result(*zed.Context) (zed.Value, error)
	ResultAsPartial(*zed.Context) (zed.Value, error)
}

type Int64

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

func NewInt64

func NewInt64(f *anymath.Function) *Int64

type Or

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

func (*Or) Consume

func (o *Or) Consume(v zed.Value) error

func (*Or) ConsumeAsPartial

func (o *Or) ConsumeAsPartial(v zed.Value) error

func (*Or) Result

func (o *Or) Result(*zed.Context) (zed.Value, error)

func (*Or) ResultAsPartial

func (o *Or) ResultAsPartial(*zed.Context) (zed.Value, error)

type Pattern

type Pattern func() Function

A Pattern is a template for creating instances of aggregator functions. NewPattern returns a pattern of the type that should be created and an instance is created by simply invoking the pattern funtion.

func NewPattern

func NewPattern(op string) (Pattern, error)

type Schema

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

Schema constructs a fused record type for the record types passed to Mixin. Records of any mixed-in type can be shaped to the fused type without loss of information.

func NewSchema

func NewSchema(zctx *zed.Context) *Schema

func (*Schema) Mixin

func (s *Schema) Mixin(t *zed.TypeRecord) error

Mixin mixes t's columns into the fused record type.

func (*Schema) Type

func (s *Schema) Type() (*zed.TypeRecord, error)

Type returns the fused record type.

type Time

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

func NewTime

func NewTime(f *anymath.Function) *Time

type Uint64

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

func NewUint64

func NewUint64(f *anymath.Function) *Uint64

type Union

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

func (*Union) Consume

func (u *Union) Consume(v zed.Value) error

func (*Union) ConsumeAsPartial

func (u *Union) ConsumeAsPartial(zv zed.Value) error

func (*Union) Result

func (u *Union) Result(zctx *zed.Context) (zed.Value, error)

func (*Union) ResultAsPartial

func (u *Union) ResultAsPartial(zctx *zed.Context) (zed.Value, error)

Jump to

Keyboard shortcuts

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