vector

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any added in v1.12.0

type Any interface {
	Type() zed.Type
	Len() uint32
	Serialize(*zcode.Builder, uint32)
}

func NewNamed added in v1.13.0

func NewNamed(typ *zed.TypeNamed, v Any) Any

func Under added in v1.14.0

func Under(v Any) Any

type Array added in v1.12.0

type Array struct {
	Typ     *zed.TypeArray
	Offsets []uint32
	Values  Any
	Nulls   *Bool
}

func NewArray added in v1.12.0

func NewArray(typ *zed.TypeArray, offsets []uint32, values Any, nulls *Bool) *Array

func (*Array) Len added in v1.13.0

func (a *Array) Len() uint32

func (*Array) Serialize added in v1.13.0

func (a *Array) Serialize(b *zcode.Builder, slot uint32)

func (*Array) Type added in v1.12.0

func (a *Array) Type() zed.Type

type Bool added in v1.12.0

type Bool struct {
	Bits  []uint64
	Nulls *Bool
	// contains filtered or unexported fields
}

func NewBool added in v1.12.0

func NewBool(bits []uint64, len uint32, nulls *Bool) *Bool

func NewBoolEmpty added in v1.13.0

func NewBoolEmpty(length uint32, nulls *Bool) *Bool

func (*Bool) CopyWithBits added in v1.14.0

func (b *Bool) CopyWithBits(bits []uint64) *Bool

func (*Bool) Len added in v1.13.0

func (b *Bool) Len() uint32

func (*Bool) Serialize added in v1.13.0

func (b *Bool) Serialize(builder *zcode.Builder, slot uint32)

func (*Bool) Set added in v1.13.0

func (b *Bool) Set(slot uint32)

func (*Bool) String added in v1.13.0

func (b *Bool) String() string

helpful to have around for debugging

func (*Bool) Type added in v1.12.0

func (b *Bool) Type() zed.Type

func (*Bool) Value added in v1.13.0

func (b *Bool) Value(slot uint32) bool

type Builder added in v1.12.0

type Builder func(*zcode.Builder) bool

type Bytes added in v1.13.0

type Bytes struct {
	Offs  []uint32
	Bytes []byte
	Nulls *Bool
}

func NewBytes added in v1.13.0

func NewBytes(offs []uint32, bytes []byte, nulls *Bool) *Bytes

func (*Bytes) Len added in v1.13.0

func (b *Bytes) Len() uint32

func (*Bytes) Serialize added in v1.13.0

func (b *Bytes) Serialize(builder *zcode.Builder, slot uint32)

func (*Bytes) Type added in v1.13.0

func (b *Bytes) Type() zed.Type

type Const added in v1.12.0

type Const struct {
	Nulls *Bool
	// contains filtered or unexported fields
}

func NewConst added in v1.12.0

func NewConst(val zed.Value, len uint32, nulls *Bool) *Const

func (*Const) AsFloat added in v1.14.0

func (c *Const) AsFloat() (float64, bool)

func (*Const) AsInt added in v1.14.0

func (c *Const) AsInt() (int64, bool)

func (*Const) AsUint added in v1.14.0

func (c *Const) AsUint() (uint64, bool)

func (*Const) Len added in v1.13.0

func (c *Const) Len() uint32

func (*Const) Length added in v1.12.0

func (c *Const) Length() int

func (*Const) Ref added in v1.12.0

func (*Const) Ref()

func (*Const) Serialize added in v1.13.0

func (c *Const) Serialize(b *zcode.Builder, slot uint32)

func (*Const) Type added in v1.12.0

func (c *Const) Type() zed.Type

func (*Const) Unref added in v1.12.0

func (*Const) Unref()

func (*Const) Value added in v1.12.0

func (c *Const) Value() zed.Value

type DictBytes added in v1.13.0

type DictBytes struct {
	Tags   []byte
	Offs   []uint32
	Bytes  []byte
	Counts []uint32
	Nulls  *Bool
}

func NewDictBytes added in v1.13.0

func NewDictBytes(tags []byte, offs []uint32, bytes []byte, counts []uint32, nulls *Bool) *DictBytes

func (*DictBytes) Len added in v1.13.0

func (d *DictBytes) Len() uint32

func (*DictBytes) Serialize added in v1.13.0

func (d *DictBytes) Serialize(b *zcode.Builder, slot uint32)

func (*DictBytes) Type added in v1.13.0

func (d *DictBytes) Type() zed.Type

func (*DictBytes) Value added in v1.13.0

func (d *DictBytes) Value(slot uint32) []byte

type DictFloat added in v1.13.0

type DictFloat struct {
	Typ    zed.Type
	Tags   []byte
	Values []float64
	Counts []uint32
	Nulls  *Bool
}

func NewDictFloat added in v1.13.0

func NewDictFloat(typ zed.Type, tags []byte, values []float64, counts []uint32, nulls *Bool) *DictFloat

func (*DictFloat) Len added in v1.13.0

func (d *DictFloat) Len() uint32

func (*DictFloat) Serialize added in v1.13.0

func (d *DictFloat) Serialize(b *zcode.Builder, slot uint32)

func (*DictFloat) Type added in v1.13.0

func (d *DictFloat) Type() zed.Type

func (*DictFloat) Value added in v1.13.0

func (d *DictFloat) Value(slot uint32) float64

type DictIP added in v1.13.0

type DictIP struct {
	Tags   []byte
	Values []netip.Addr
	Counts []uint32
	Nulls  *Bool
}

func NewDictIP added in v1.13.0

func NewDictIP(tags []byte, values []netip.Addr, counts []uint32, nulls *Bool) *DictIP

func (*DictIP) Len added in v1.13.0

func (d *DictIP) Len() uint32

func (*DictIP) Serialize added in v1.13.0

func (d *DictIP) Serialize(b *zcode.Builder, slot uint32)

func (*DictIP) Type added in v1.13.0

func (d *DictIP) Type() zed.Type

func (*DictIP) Value added in v1.13.0

func (d *DictIP) Value(slot uint32) netip.Addr

type DictInt added in v1.13.0

type DictInt struct {
	Typ    zed.Type
	Tags   []byte
	Values []int64
	Counts []uint32
	Nulls  *Bool
}

func NewDictInt added in v1.13.0

func NewDictInt(typ zed.Type, tags []byte, values []int64, counts []uint32, nulls *Bool) *DictInt

func (*DictInt) Len added in v1.13.0

func (d *DictInt) Len() uint32

func (*DictInt) Promote added in v1.14.0

func (d *DictInt) Promote(typ zed.Type) *DictInt

func (*DictInt) Serialize added in v1.13.0

func (d *DictInt) Serialize(b *zcode.Builder, slot uint32)

func (*DictInt) Type added in v1.13.0

func (d *DictInt) Type() zed.Type

func (*DictInt) Value added in v1.13.0

func (d *DictInt) Value(slot uint32) int64

type DictNet added in v1.13.0

type DictNet struct {
	Tags   []byte
	Values []netip.Prefix
	Counts []uint32
	Nulls  *Bool
}

func NewDictNet added in v1.13.0

func NewDictNet(tags []byte, values []netip.Prefix, counts []uint32, nulls *Bool) *DictNet

func (*DictNet) Len added in v1.13.0

func (d *DictNet) Len() uint32

func (*DictNet) Serialize added in v1.13.0

func (d *DictNet) Serialize(b *zcode.Builder, slot uint32)

func (*DictNet) Type added in v1.13.0

func (d *DictNet) Type() zed.Type

func (*DictNet) Value added in v1.13.0

func (d *DictNet) Value(slot uint32) netip.Prefix

type DictString added in v1.13.0

type DictString struct {
	Tags   []byte
	Offs   []uint32
	Bytes  []byte
	Counts []uint32
	Nulls  *Bool
}

func NewDictString added in v1.13.0

func NewDictString(tags []byte, offs []uint32, bytes []byte, counts []uint32, nulls *Bool) *DictString

func (*DictString) Len added in v1.13.0

func (d *DictString) Len() uint32

func (*DictString) Serialize added in v1.13.0

func (d *DictString) Serialize(b *zcode.Builder, slot uint32)

func (*DictString) Type added in v1.13.0

func (d *DictString) Type() zed.Type

func (*DictString) Value added in v1.13.0

func (d *DictString) Value(slot uint32) string

type DictTypeValue added in v1.13.0

type DictTypeValue struct {
	Tags   []byte
	Offs   []uint32
	Bytes  []byte
	Counts []uint32
	Nulls  *Bool
}

func NewDictTypeValue added in v1.13.0

func NewDictTypeValue(tags []byte, offs []uint32, bytes []byte, counts []uint32, nulls *Bool) *DictTypeValue

func (*DictTypeValue) Len added in v1.13.0

func (d *DictTypeValue) Len() uint32

func (*DictTypeValue) Serialize added in v1.13.0

func (d *DictTypeValue) Serialize(b *zcode.Builder, slot uint32)

func (*DictTypeValue) Type added in v1.13.0

func (d *DictTypeValue) Type() zed.Type

func (*DictTypeValue) Value added in v1.13.0

func (d *DictTypeValue) Value(slot uint32) []byte

type DictUint added in v1.13.0

type DictUint struct {
	Typ    zed.Type
	Tags   []byte
	Values []uint64
	Counts []uint32
	Nulls  *Bool
}

func NewDictUint added in v1.13.0

func NewDictUint(typ zed.Type, tags []byte, values []uint64, counts []uint32, nulls *Bool) *DictUint

func (*DictUint) Len added in v1.13.0

func (d *DictUint) Len() uint32

func (*DictUint) Promote added in v1.14.0

func (d *DictUint) Promote(typ zed.Type) *DictUint

func (*DictUint) Serialize added in v1.13.0

func (d *DictUint) Serialize(b *zcode.Builder, slot uint32)

func (*DictUint) Type added in v1.13.0

func (d *DictUint) Type() zed.Type

func (*DictUint) Value added in v1.13.0

func (d *DictUint) Value(slot uint32) uint64

type Error added in v1.13.0

type Error struct {
	Typ   zed.Type
	Vals  Any
	Nulls *Bool
}

func NewError added in v1.13.0

func NewError(typ zed.Type, vals Any, nulls *Bool) *Error

XXX we shouldn't create empty fields... this was the old design, now we create the entire vector structure and page in leaves, offsets, etc on demand

func NewMissing added in v1.13.0

func NewMissing(zctx *zed.Context, len uint32) *Error

func NewStringError added in v1.14.0

func NewStringError(zctx *zed.Context, msg string, len uint32) *Error

func (*Error) Len added in v1.13.0

func (e *Error) Len() uint32

func (*Error) Serialize added in v1.13.0

func (e *Error) Serialize(b *zcode.Builder, slot uint32)

func (*Error) Type added in v1.13.0

func (e *Error) Type() zed.Type

type Float added in v1.13.0

type Float struct {
	Typ    zed.Type
	Values []float64
	Nulls  *Bool
}

func NewFloat added in v1.13.0

func NewFloat(typ zed.Type, values []float64, nulls *Bool) *Float

func (*Float) Len added in v1.13.0

func (f *Float) Len() uint32

func (*Float) Serialize added in v1.13.0

func (f *Float) Serialize(b *zcode.Builder, slot uint32)

func (*Float) Type added in v1.13.0

func (f *Float) Type() zed.Type

type IP added in v1.13.0

type IP struct {
	Values []netip.Addr
	Nulls  *Bool
}

func NewIP added in v1.13.0

func NewIP(values []netip.Addr, nulls *Bool) *IP

func (*IP) Len added in v1.13.0

func (i *IP) Len() uint32

func (*IP) Serialize added in v1.13.0

func (i *IP) Serialize(b *zcode.Builder, slot uint32)

func (*IP) Type added in v1.13.0

func (i *IP) Type() zed.Type

type Int added in v1.12.0

type Int struct {
	Typ    zed.Type
	Values []int64
	Nulls  *Bool
}

func NewInt added in v1.12.0

func NewInt(typ zed.Type, values []int64, nulls *Bool) *Int

func (*Int) Len added in v1.13.0

func (i *Int) Len() uint32

func (*Int) Promote added in v1.14.0

func (i *Int) Promote(typ zed.Type) *Int

func (*Int) Serialize added in v1.13.0

func (i *Int) Serialize(b *zcode.Builder, slot uint32)

func (*Int) Type added in v1.12.0

func (i *Int) Type() zed.Type

type Map added in v1.12.0

type Map struct {
	Typ     *zed.TypeMap
	Offsets []uint32
	Keys    Any
	Values  Any
	Nulls   *Bool
}

func NewMap added in v1.12.0

func NewMap(typ *zed.TypeMap, offsets []uint32, keys Any, values Any, nulls *Bool) *Map

func (*Map) Len added in v1.13.0

func (m *Map) Len() uint32

func (*Map) Serialize added in v1.13.0

func (m *Map) Serialize(b *zcode.Builder, slot uint32)

func (*Map) Type added in v1.12.0

func (m *Map) Type() zed.Type

type Named added in v1.13.0

type Named struct {
	Typ *zed.TypeNamed
	Any
}

func (*Named) Type added in v1.13.0

func (n *Named) Type() zed.Type

type Net added in v1.13.0

type Net struct {
	Values []netip.Prefix
	Nulls  *Bool
}

func NewNet added in v1.13.0

func NewNet(values []netip.Prefix, nulls *Bool) *Net

func (*Net) Len added in v1.13.0

func (n *Net) Len() uint32

func (*Net) Serialize added in v1.13.0

func (n *Net) Serialize(b *zcode.Builder, slot uint32)

func (*Net) Type added in v1.13.0

func (n *Net) Type() zed.Type

type Puller added in v1.13.0

type Puller interface {
	Pull(done bool) (Any, error)
}

type Record added in v1.12.0

type Record struct {
	Typ    *zed.TypeRecord
	Fields []Any

	Nulls *Bool
	// contains filtered or unexported fields
}

func NewRecord added in v1.12.0

func NewRecord(typ *zed.TypeRecord, fields []Any, length uint32, nulls *Bool) *Record

func (*Record) Len added in v1.13.0

func (r *Record) Len() uint32

func (*Record) Serialize added in v1.13.0

func (r *Record) Serialize(b *zcode.Builder, slot uint32)

func (*Record) Type added in v1.12.0

func (r *Record) Type() zed.Type

type Set added in v1.13.0

type Set struct {
	Typ     *zed.TypeSet
	Offsets []uint32
	Values  Any
	Nulls   *Bool
}

func NewSet added in v1.13.0

func NewSet(typ *zed.TypeSet, offsets []uint32, values Any, nulls *Bool) *Set

func (*Set) Len added in v1.13.0

func (s *Set) Len() uint32

func (*Set) Serialize added in v1.13.0

func (s *Set) Serialize(b *zcode.Builder, slot uint32)

func (*Set) Type added in v1.13.0

func (s *Set) Type() zed.Type

type String added in v1.12.0

type String struct {
	Offsets []uint32
	Bytes   []byte
	Nulls   *Bool
}

func NewString added in v1.12.0

func NewString(offsets []uint32, bytes []byte, nulls *Bool) *String

func (*String) Len added in v1.13.0

func (s *String) Len() uint32

func (*String) Serialize added in v1.13.0

func (s *String) Serialize(b *zcode.Builder, slot uint32)

func (*String) Type added in v1.12.0

func (s *String) Type() zed.Type

func (*String) Value added in v1.13.0

func (s *String) Value(slot uint32) string

type TagMap added in v1.13.0

type TagMap struct {
	Forward []uint32
	Reverse [][]uint32
}

TagMap is used by variants and unions to map slots between parent and child in both the forward and reverse directions. We need this because vectors are stored in a dense format where different types hold only the values needed for that type. If we stored vectors in a sparse format, the amount of overhead would increase substantially for heterogeneously typed data.

func NewTagMap added in v1.13.0

func NewTagMap(tags []uint32, vals []Any) *TagMap

func NewTagMapFromLens added in v1.13.0

func NewTagMapFromLens(tags []uint32, lens []uint32) *TagMap

type TypeValue added in v1.13.0

type TypeValue struct {
	Offsets []uint32
	Bytes   []byte
	Nulls   *Bool
}

func NewTypeValue added in v1.13.0

func NewTypeValue(offs []uint32, bytes []byte, nulls *Bool) *TypeValue

func (*TypeValue) Len added in v1.13.0

func (t *TypeValue) Len() uint32

func (*TypeValue) Serialize added in v1.13.0

func (t *TypeValue) Serialize(b *zcode.Builder, slot uint32)

func (*TypeValue) Type added in v1.13.0

func (t *TypeValue) Type() zed.Type

func (*TypeValue) Value added in v1.13.0

func (t *TypeValue) Value(slot uint32) []byte

type Uint added in v1.12.0

type Uint struct {
	Typ    zed.Type
	Values []uint64
	Nulls  *Bool
}

func NewUint added in v1.12.0

func NewUint(typ zed.Type, values []uint64, nulls *Bool) *Uint

func (*Uint) Len added in v1.13.0

func (u *Uint) Len() uint32

func (*Uint) Promote added in v1.14.0

func (u *Uint) Promote(typ zed.Type) *Uint

func (*Uint) Serialize added in v1.13.0

func (u *Uint) Serialize(b *zcode.Builder, slot uint32)

func (*Uint) Type added in v1.12.0

func (u *Uint) Type() zed.Type

type Union added in v1.12.0

type Union struct {
	Typ    *zed.TypeUnion
	Tags   []uint32
	TagMap TagMap
	Values []Any
	Nulls  *Bool
}

func NewUnion added in v1.12.0

func NewUnion(typ *zed.TypeUnion, tags []uint32, vals []Any, nulls *Bool) *Union

func (*Union) Copy added in v1.13.0

func (u *Union) Copy(vals []Any) *Union

func (*Union) Len added in v1.13.0

func (u *Union) Len() uint32

func (*Union) Serialize added in v1.13.0

func (u *Union) Serialize(b *zcode.Builder, slot uint32)

func (*Union) Type added in v1.12.0

func (u *Union) Type() zed.Type

type Variant added in v1.13.0

type Variant struct {
	Tags   []uint32
	Values []Any
	TagMap *TagMap
}

Variant is an ordered sequence of values taken from one or more hetereogenously-typed vectors.

func NewVariant added in v1.13.0

func NewVariant(tags []uint32, values []Any) *Variant

func (*Variant) Len added in v1.13.0

func (v *Variant) Len() uint32

func (*Variant) Serialize added in v1.13.0

func (v *Variant) Serialize(b *zcode.Builder, slot uint32)

func (*Variant) Type added in v1.13.0

func (v *Variant) Type() zed.Type

func (*Variant) TypeOf added in v1.13.0

func (v *Variant) TypeOf(slot uint32) zed.Type

Jump to

Keyboard shortcuts

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