nulls

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package nulls wrap up functions for the manipulation of bitmap library roaring. MatrixOne uses nulls to store all NULL values in a column. You can think of Nulls as a bitmap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(nsp *Nulls, rows ...uint64)

func AddRange added in v0.6.0

func AddRange(nsp *Nulls, start, end uint64)

func Any

func Any(nsp *Nulls) bool

Any returns true if any bit in the Nulls is set, otherwise it will return false.

func Contains

func Contains(nsp *Nulls, row uint64) bool

func Del

func Del(nsp *Nulls, rows ...uint64)

func Filter

func Filter(nsp *Nulls, sels []int64, negate bool)

XXX old API returns nsp, which is broken -- we update in place.

func FilterCount

func FilterCount(nsp *Nulls, sels []int64) int

FilterCount returns the number count that appears in both nsp and sel

func Or

func Or(nsp, m, r *Nulls)

Or performs union operation on Nulls nsp,m and store the result in r

func Ptr added in v0.6.0

func Ptr(nsp *Nulls) *uint64

func Range

func Range(nsp *Nulls, start, end, bias uint64, m *Nulls)

Range adds the numbers in nsp starting at start and ending at end to m. `bias` represents the starting offset used for the Range Output Always update in place.

func RemoveRange

func RemoveRange(nsp *Nulls, start, end uint64)

func Set

func Set(nsp, m *Nulls)

Set performs union operation on Nulls nsp,m and store the result in nsp

func Size

func Size(nsp *Nulls) int

Size estimates the memory usage of the Nulls.

func String

func String(nsp *Nulls) string

func ToArray added in v0.8.0

func ToArray[T constraints.Integer](nsp *Nulls) []T

func TryExpand added in v0.5.1

func TryExpand(nsp *Nulls, size int)

Types

type Bitmap added in v0.8.0

type Bitmap = Nulls

type Nulls

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

func Build added in v0.6.0

func Build(size int, rows ...uint64) *Nulls

func NewWithSize added in v0.5.1

func NewWithSize(size int) *Nulls

func (*Nulls) Add added in v0.8.0

func (nsp *Nulls) Add(rows ...uint64)

func (*Nulls) AddRange added in v0.8.0

func (nsp *Nulls) AddRange(start, end uint64)

func (*Nulls) Any added in v0.5.1

func (nsp *Nulls) Any() bool

XXX This emptyFlag thing is broken -- it simply cannot be used concurrently. Make any an alias of EmptyByFlag, otherwise there will be hell lots of race conditions.

func (*Nulls) Build added in v0.8.0

func (nsp *Nulls) Build(size int, rows ...uint64)

func (*Nulls) Clone added in v0.6.0

func (nsp *Nulls) Clone() *Nulls

func (*Nulls) Contains added in v0.5.1

func (nsp *Nulls) Contains(row uint64) bool

Contains returns true if the integer is contained in the Nulls

func (*Nulls) Count added in v0.8.0

func (nsp *Nulls) Count() int

pop count

func (*Nulls) Del added in v0.8.0

func (nsp *Nulls) Del(rows ...uint64)

func (*Nulls) DelI64 added in v0.8.0

func (nsp *Nulls) DelI64(rows ...int64)

func (*Nulls) EmptyByFlag added in v0.8.0

func (nsp *Nulls) EmptyByFlag() bool

func (*Nulls) Foreach added in v0.8.0

func (nsp *Nulls) Foreach(fn func(uint64) bool)

func (*Nulls) GetBitmap added in v0.8.0

func (nsp *Nulls) GetBitmap() *bitmap.Bitmap

func (*Nulls) GetCardinality added in v0.8.0

func (nsp *Nulls) GetCardinality() int

func (*Nulls) InitWith added in v0.8.0

func (nsp *Nulls) InitWith(n *Nulls)

func (*Nulls) InitWithSize added in v0.8.0

func (nsp *Nulls) InitWithSize(size int)

func (*Nulls) IsEmpty added in v0.8.0

func (nsp *Nulls) IsEmpty() bool

func (*Nulls) IsSame added in v0.8.0

func (nsp *Nulls) IsSame(m *Nulls) bool

func (*Nulls) Merge added in v0.8.0

func (nsp *Nulls) Merge(o *Nulls)

func (*Nulls) Or

func (nsp *Nulls) Or(m *Nulls) *Nulls

XXX This API is foundementally broken. Depends on empty or not this shit may or may not modify nsp.

func (*Nulls) Read

func (nsp *Nulls) Read(data []byte) error

func (*Nulls) ReadNoCopy added in v0.8.0

func (nsp *Nulls) ReadNoCopy(data []byte) error

func (*Nulls) Reset added in v0.8.0

func (nsp *Nulls) Reset()

func (*Nulls) Set added in v0.5.1

func (nsp *Nulls) Set(row uint64)

func (*Nulls) Show

func (nsp *Nulls) Show() ([]byte, error)

func (*Nulls) String added in v0.8.0

func (nsp *Nulls) String() string

func (*Nulls) ToArray added in v0.8.0

func (nsp *Nulls) ToArray() []uint64

func (*Nulls) ToI64Arrary added in v0.8.0

func (nsp *Nulls) ToI64Arrary() []int64

func (*Nulls) Unset added in v0.8.0

func (nsp *Nulls) Unset(row uint64)

Call it unset to match set. Clear or reset are taken.

Jump to

Keyboard shortcuts

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