aggregate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package aggregate implements the "aggregate" transform primitive: it folds every existing State.Rows entry's Values[field] down to one summary value (sum, avg, min, or max) and appends the result as a new Row.

Index

Constants

View Source
const Name = "aggregate"

Name is the primitive's registry key.

Variables

View Source
var ErrInvalidParams = errors.New("invalid aggregate params")

ErrInvalidParams is returned by New when the "aggregate" step's params omit field or specify an op that isn't OpSum, OpAvg, OpMin, or OpMax.

Functions

func New

func New(params []byte) (transform.Primitive, error)

Types

type Op

type Op = string

Op is the finite set of aggregation operations "aggregate" supports.

const (
	OpSum Op = "sum"
	OpAvg Op = "avg"
	OpMin Op = "min"
	OpMax Op = "max"
)

Jump to

Keyboard shortcuts

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