vector

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FLAT     = iota // flat vector represent a uncompressed vector
	CONSTANT        // const vector
	DIST            // dictionary vector
)

Variables

This section is empty.

Functions

func AppendAny added in v0.8.0

func AppendAny(vec *Vector, val any, isNull bool, mp *mpool.MPool) error

func AppendBytes added in v0.6.0

func AppendBytes(vec *Vector, val []byte, isNull bool, mp *mpool.MPool) error

func AppendBytesList added in v0.8.0

func AppendBytesList(vec *Vector, ws [][]byte, isNulls []bool, mp *mpool.MPool) error

func AppendFixed added in v0.6.0

func AppendFixed[T any](vec *Vector, val T, isNull bool, mp *mpool.MPool) error

func AppendFixedList added in v0.8.0

func AppendFixedList[T any](vec *Vector, ws []T, isNulls []bool, mp *mpool.MPool) error

func AppendMultiBytes added in v0.8.0

func AppendMultiBytes(vec *Vector, vals []byte, isNull bool, cnt int, mp *mpool.MPool) error

func AppendMultiFixed added in v0.8.0

func AppendMultiFixed[T any](vec *Vector, vals T, isNull bool, cnt int, mp *mpool.MPool) error

func AppendStringList added in v0.8.0

func AppendStringList(vec *Vector, ws []string, isNulls []bool, mp *mpool.MPool) error

func BuildVarlenaFromByteSlice added in v1.0.0

func BuildVarlenaFromByteSlice(vec *Vector, v *types.Varlena, bs *[]byte, m *mpool.MPool) error

func BuildVarlenaFromValena added in v1.0.0

func BuildVarlenaFromValena(vec *Vector, v1, v2 *types.Varlena, area *[]byte, m *mpool.MPool) error

func BuildVarlenaInline added in v1.0.0

func BuildVarlenaInline(v1, v2 *types.Varlena)

func BuildVarlenaNoInline added in v1.0.0

func BuildVarlenaNoInline(vec *Vector, v1 *types.Varlena, bs *[]byte, m *mpool.MPool) error

func Decimal64GetSum added in v1.0.0

func Decimal64GetSum(vec *Vector) (sum types.Decimal64)

func DecodeFixedCol

func DecodeFixedCol[T types.FixedSizeT](v *Vector) []T

func ExpandBytesCol added in v0.8.0

func ExpandBytesCol(v *Vector) [][]byte

func ExpandFixedCol added in v0.8.0

func ExpandFixedCol[T any](v *Vector) []T

ExpandFixedCol decode data and return decoded []T. For const/scalar vector we expand and return newly allocated slice.

func ExpandStrCol added in v0.8.0

func ExpandStrCol(v *Vector) []string

func FindFirstIndexInSortedVarlenVector added in v0.8.0

func FindFirstIndexInSortedVarlenVector(vec *Vector, v []byte) int

FindFirstIndexInSortedSlice finds the first index of v in a sorted varlen vector

func FixedSizeFindFirstIndexInSortedSliceWithCompare added in v0.8.0

func FixedSizeFindFirstIndexInSortedSliceWithCompare[T types.FixedSizeTExceptStrType](
	v T, s []T, compare func(T, T) int,
) int

FindFirstIndexInSortedSlice finds the first index of v in a sorted slice s If v is not found, return -1 compare is a function to compare two elements in s

func FixedSizeGetMinMax added in v0.8.0

func FixedSizeGetMinMax[T types.OrderedT](
	vec *Vector, comp func(T, T) int64,
) (minv, maxv T)

func FixedSizedBinarySearchOffsetByValFactory added in v1.0.0

func FixedSizedBinarySearchOffsetByValFactory[T any](vals []T, cmp func(T, T) int) func(*Vector) []int32

func FloatGetSum added in v1.0.0

func FloatGetSum[T types.Floats](vec *Vector) (sum float64)

FloatGetSum get the sum the vector if the vector type is float.

func GetConstSetFunction added in v0.8.0

func GetConstSetFunction(typ types.Type, mp *mpool.MPool) func(v, w *Vector, sel int64, length int) error

GetConstSetFunction: A more sensible function for const vector set, which avoids having to do type conversions and type judgements every time you append.

func GetFixedAt added in v0.8.0

func GetFixedAt[T any](v *Vector, idx int) T

func GetPtrAt added in v0.6.0

func GetPtrAt[T any](v *Vector, idx int64) *T

func GetUnionAllFunction added in v0.8.0

func GetUnionAllFunction(typ types.Type, mp *mpool.MPool) func(v, w *Vector) error

GetUnionAllFunction: A more sensible function for copying vector, which avoids having to do type conversions and type judgements every time you append.

func GetUnionOneFunction added in v0.8.0

func GetUnionOneFunction(typ types.Type, mp *mpool.MPool) func(v, w *Vector, sel int64) error

GetUnionOneFunction: A more sensible function for copying elements, which avoids having to do type conversions and type judgements every time you append.

func IntegerGetSum added in v1.0.0

func IntegerGetSum[T types.Ints | types.UInts, U int64 | uint64](vec *Vector) (sum U)

IntegerGetSum get the sum the vector if the vector type is integer.

func MakeAppendBytesFunc added in v0.8.0

func MakeAppendBytesFunc(vec *Vector) func([]byte, bool, *mpool.MPool) error

func MustBytesCol added in v0.8.0

func MustBytesCol(v *Vector) [][]byte

func MustFixedCol added in v0.8.0

func MustFixedCol[T any](v *Vector) []T

func MustStrCol added in v0.8.0

func MustStrCol(v *Vector) []string

func MustVarlenaRawData added in v0.6.0

func MustVarlenaRawData(v *Vector) (data []types.Varlena, area []byte)

func MustVarlenaToInt64Slice added in v1.0.0

func MustVarlenaToInt64Slice(v *Vector) [][3]int64

func OrderedBinarySearchOffsetByValFactory added in v0.8.0

func OrderedBinarySearchOffsetByValFactory[T types.OrderedT](vals []T) func(*Vector) []int32

func OrderedFindFirstIndexInSortedSlice added in v0.8.0

func OrderedFindFirstIndexInSortedSlice[T types.OrderedT](v T, s []T) int

FindFirstIndexInSortedSlice finds the first index of v in a sorted slice s If v is not found, return -1

func OrderedGetMinAndMax added in v0.8.0

func OrderedGetMinAndMax[T types.OrderedT](vec *Vector) (minv, maxv T)

OrderedGetMinAndMax returns the min and max value of a vector of ordered type If the vector has null, the null value will be ignored

func ProtoTypeToType added in v0.6.0

func ProtoTypeToType(typ *plan.Type) types.Type

func SetBytesAt added in v0.6.0

func SetBytesAt(v *Vector, idx int, bs []byte, mp *mpool.MPool) error

func SetConstBytes added in v0.8.0

func SetConstBytes(vec *Vector, val []byte, length int, mp *mpool.MPool) error

func SetConstFixed added in v0.8.0

func SetConstFixed[T any](vec *Vector, val T, length int, mp *mpool.MPool) error

func SetConstNull added in v0.8.0

func SetConstNull(vec *Vector, length int, mp *mpool.MPool) error

func SetFixedAt added in v0.8.0

func SetFixedAt[T types.FixedSizeT](v *Vector, idx int, t T) error

func SetStringAt added in v0.6.0

func SetStringAt(v *Vector, idx int, bs string, mp *mpool.MPool) error

func TypeToProtoType added in v0.6.0

func TypeToProtoType(typ types.Type) *plan.Type

func VarlenBinarySearchOffsetByValFactory added in v0.8.0

func VarlenBinarySearchOffsetByValFactory(vals [][]byte) func(*Vector) []int32

func VarlenGetMinMax added in v0.8.0

func VarlenGetMinMax(vec *Vector) (minv, maxv []byte)

func VectorToProtoVector added in v0.6.0

func VectorToProtoVector(vec *Vector) (*api.Vector, error)

Types

type FunctionParameterNormal added in v0.7.0

type FunctionParameterNormal[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

FunctionParameterNormal is a wrapper of normal vector which may contains null value.

func (*FunctionParameterNormal[T]) GetSourceVector added in v0.7.0

func (p *FunctionParameterNormal[T]) GetSourceVector() *Vector

func (*FunctionParameterNormal[T]) GetStrValue added in v0.7.0

func (p *FunctionParameterNormal[T]) GetStrValue(idx uint64) (value []byte, isNull bool)

func (*FunctionParameterNormal[T]) GetType added in v0.7.0

func (p *FunctionParameterNormal[T]) GetType() types.Type

func (*FunctionParameterNormal[T]) GetValue added in v0.7.0

func (p *FunctionParameterNormal[T]) GetValue(idx uint64) (value T, isNull bool)

func (*FunctionParameterNormal[T]) UnSafeGetAllValue added in v0.7.0

func (p *FunctionParameterNormal[T]) UnSafeGetAllValue() []T

func (*FunctionParameterNormal[T]) WithAnyNullValue added in v0.8.0

func (p *FunctionParameterNormal[T]) WithAnyNullValue() bool

type FunctionParameterNormalSpecial1 added in v0.8.0

type FunctionParameterNormalSpecial1[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

FunctionParameterNormalSpecial1 is an optimized wrapper of string vector whose string width <= types.VarlenaInlineSize

func (*FunctionParameterNormalSpecial1[T]) GetSourceVector added in v0.8.0

func (p *FunctionParameterNormalSpecial1[T]) GetSourceVector() *Vector

func (*FunctionParameterNormalSpecial1[T]) GetStrValue added in v0.8.0

func (p *FunctionParameterNormalSpecial1[T]) GetStrValue(idx uint64) ([]byte, bool)

func (*FunctionParameterNormalSpecial1[T]) GetType added in v0.8.0

func (p *FunctionParameterNormalSpecial1[T]) GetType() types.Type

func (*FunctionParameterNormalSpecial1[T]) GetValue added in v0.8.0

func (p *FunctionParameterNormalSpecial1[T]) GetValue(_ uint64) (T, bool)

func (*FunctionParameterNormalSpecial1[T]) UnSafeGetAllValue added in v0.8.0

func (p *FunctionParameterNormalSpecial1[T]) UnSafeGetAllValue() []T

func (*FunctionParameterNormalSpecial1[T]) WithAnyNullValue added in v0.8.0

func (p *FunctionParameterNormalSpecial1[T]) WithAnyNullValue() bool

type FunctionParameterScalar added in v0.7.0

type FunctionParameterScalar[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

FunctionParameterScalar is a wrapper of scalar vector.

func (*FunctionParameterScalar[T]) GetSourceVector added in v0.7.0

func (p *FunctionParameterScalar[T]) GetSourceVector() *Vector

func (*FunctionParameterScalar[T]) GetStrValue added in v0.7.0

func (p *FunctionParameterScalar[T]) GetStrValue(_ uint64) ([]byte, bool)

func (*FunctionParameterScalar[T]) GetType added in v0.7.0

func (p *FunctionParameterScalar[T]) GetType() types.Type

func (*FunctionParameterScalar[T]) GetValue added in v0.7.0

func (p *FunctionParameterScalar[T]) GetValue(_ uint64) (T, bool)

func (*FunctionParameterScalar[T]) UnSafeGetAllValue added in v0.7.0

func (p *FunctionParameterScalar[T]) UnSafeGetAllValue() []T

func (*FunctionParameterScalar[T]) WithAnyNullValue added in v0.8.0

func (p *FunctionParameterScalar[T]) WithAnyNullValue() bool

type FunctionParameterScalarNull added in v0.7.0

type FunctionParameterScalarNull[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

FunctionParameterScalarNull is a wrapper of scalar null vector.

func (*FunctionParameterScalarNull[T]) GetSourceVector added in v0.7.0

func (p *FunctionParameterScalarNull[T]) GetSourceVector() *Vector

func (*FunctionParameterScalarNull[T]) GetStrValue added in v0.7.0

func (p *FunctionParameterScalarNull[T]) GetStrValue(_ uint64) ([]byte, bool)

func (*FunctionParameterScalarNull[T]) GetType added in v0.7.0

func (p *FunctionParameterScalarNull[T]) GetType() types.Type

func (*FunctionParameterScalarNull[T]) GetValue added in v0.7.0

func (p *FunctionParameterScalarNull[T]) GetValue(_ uint64) (value T, isNull bool)

func (*FunctionParameterScalarNull[T]) UnSafeGetAllValue added in v0.7.0

func (p *FunctionParameterScalarNull[T]) UnSafeGetAllValue() []T

func (*FunctionParameterScalarNull[T]) WithAnyNullValue added in v0.8.0

func (p *FunctionParameterScalarNull[T]) WithAnyNullValue() bool

type FunctionParameterWithoutNull added in v0.7.0

type FunctionParameterWithoutNull[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

FunctionParameterWithoutNull is a wrapper of normal vector but without null value.

func (*FunctionParameterWithoutNull[T]) GetSourceVector added in v0.7.0

func (p *FunctionParameterWithoutNull[T]) GetSourceVector() *Vector

func (*FunctionParameterWithoutNull[T]) GetStrValue added in v0.7.0

func (p *FunctionParameterWithoutNull[T]) GetStrValue(idx uint64) ([]byte, bool)

func (*FunctionParameterWithoutNull[T]) GetType added in v0.7.0

func (p *FunctionParameterWithoutNull[T]) GetType() types.Type

func (*FunctionParameterWithoutNull[T]) GetValue added in v0.7.0

func (p *FunctionParameterWithoutNull[T]) GetValue(idx uint64) (T, bool)

func (*FunctionParameterWithoutNull[T]) UnSafeGetAllValue added in v0.7.0

func (p *FunctionParameterWithoutNull[T]) UnSafeGetAllValue() []T

func (*FunctionParameterWithoutNull[T]) WithAnyNullValue added in v0.8.0

func (p *FunctionParameterWithoutNull[T]) WithAnyNullValue() bool

type FunctionParameterWithoutNullSpecial1 added in v0.8.0

type FunctionParameterWithoutNullSpecial1[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

FunctionParameterWithoutNullSpecial1 is an optimized wrapper of string vector without null value and whose string width <= types.VarlenaInlineSize

func (*FunctionParameterWithoutNullSpecial1[T]) GetSourceVector added in v0.8.0

func (p *FunctionParameterWithoutNullSpecial1[T]) GetSourceVector() *Vector

func (*FunctionParameterWithoutNullSpecial1[T]) GetStrValue added in v0.8.0

func (p *FunctionParameterWithoutNullSpecial1[T]) GetStrValue(idx uint64) ([]byte, bool)

func (*FunctionParameterWithoutNullSpecial1[T]) GetType added in v0.8.0

func (*FunctionParameterWithoutNullSpecial1[T]) GetValue added in v0.8.0

func (p *FunctionParameterWithoutNullSpecial1[T]) GetValue(_ uint64) (T, bool)

func (*FunctionParameterWithoutNullSpecial1[T]) UnSafeGetAllValue added in v0.8.0

func (p *FunctionParameterWithoutNullSpecial1[T]) UnSafeGetAllValue() []T

func (*FunctionParameterWithoutNullSpecial1[T]) WithAnyNullValue added in v0.8.0

func (p *FunctionParameterWithoutNullSpecial1[T]) WithAnyNullValue() bool

type FunctionParameterWrapper added in v0.7.0

type FunctionParameterWrapper[T types.FixedSizeT] interface {
	// GetType will return the type info of wrapped parameter.
	GetType() types.Type

	// GetSourceVector return the source vector.
	GetSourceVector() *Vector

	// GetValue return the Idx th value and if it's null or not.
	// watch that, if str type, GetValue will return the []types.Varlena directly.
	GetValue(idx uint64) (T, bool)

	// GetStrValue return the Idx th string value and if it's null or not.
	GetStrValue(idx uint64) ([]byte, bool)

	// UnSafeGetAllValue return all the values.
	// please use it carefully because we didn't check the null situation.
	UnSafeGetAllValue() []T

	WithAnyNullValue() bool
}

FunctionParameterWrapper is generated from a vector. It hides the relevant details of vector (like scalar and contain null or not.) and provides a series of methods to get values.

func GenerateFunctionFixedTypeParameter added in v0.7.0

func GenerateFunctionFixedTypeParameter[T types.FixedSizeTExceptStrType](v *Vector) FunctionParameterWrapper[T]

func GenerateFunctionStrParameter added in v0.7.0

func GenerateFunctionStrParameter(v *Vector) FunctionParameterWrapper[types.Varlena]

type FunctionResult added in v0.7.0

type FunctionResult[T types.FixedSizeT] struct {
	// contains filtered or unexported fields
}

func MustFunctionResult added in v0.7.0

func MustFunctionResult[T types.FixedSizeT](wrapper FunctionResultWrapper) *FunctionResult[T]

func (*FunctionResult[T]) Append added in v0.7.0

func (fr *FunctionResult[T]) Append(val T, isnull bool) error

func (*FunctionResult[T]) AppendBytes added in v0.8.0

func (fr *FunctionResult[T]) AppendBytes(val []byte, isnull bool) error

func (*FunctionResult[T]) AppendMustBytesValue added in v0.8.0

func (fr *FunctionResult[T]) AppendMustBytesValue(val []byte) error

func (*FunctionResult[T]) AppendMustNull added in v0.8.0

func (fr *FunctionResult[T]) AppendMustNull()

func (*FunctionResult[T]) AppendMustNullForBytesResult added in v0.8.0

func (fr *FunctionResult[T]) AppendMustNullForBytesResult() error

func (*FunctionResult[T]) AppendMustValue added in v0.8.0

func (fr *FunctionResult[T]) AppendMustValue(val T)

func (*FunctionResult[T]) ConvertToStrParameter added in v0.7.0

func (fr *FunctionResult[T]) ConvertToStrParameter() FunctionParameterWrapper[types.Varlena]

func (*FunctionResult[T]) DupFromParameter added in v0.8.0

func (fr *FunctionResult[T]) DupFromParameter(fp FunctionParameterWrapper[T], length int) (err error)

func (*FunctionResult[T]) Free added in v0.7.0

func (fr *FunctionResult[T]) Free()

func (*FunctionResult[T]) GetResultVector added in v0.7.0

func (fr *FunctionResult[T]) GetResultVector() *Vector

func (*FunctionResult[T]) GetType added in v0.7.0

func (fr *FunctionResult[T]) GetType() types.Type

func (*FunctionResult[T]) PreExtendAndReset added in v0.8.0

func (fr *FunctionResult[T]) PreExtendAndReset(size int) error

func (*FunctionResult[T]) SetResultVector added in v0.8.0

func (fr *FunctionResult[T]) SetResultVector(v *Vector)

func (*FunctionResult[T]) TempSetType added in v0.8.0

func (fr *FunctionResult[T]) TempSetType(t types.Type)

type FunctionResultWrapper added in v0.7.0

type FunctionResultWrapper interface {
	SetResultVector(vec *Vector)
	GetResultVector() *Vector
	Free()
	PreExtendAndReset(size int) error
}

func NewFunctionResultWrapper added in v0.7.0

func NewFunctionResultWrapper(
	getVectorMethod func(typ types.Type) *Vector,
	putVectorMethod func(vec *Vector),
	typ types.Type,
	mp *mpool.MPool) FunctionResultWrapper

type Vector

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

Vector represent a column

func NewConstBytes added in v0.6.0

func NewConstBytes(typ types.Type, val []byte, length int, mp *mpool.MPool) *Vector

func NewConstFixed added in v0.6.0

func NewConstFixed[T any](typ types.Type, val T, length int, mp *mpool.MPool) *Vector

func NewConstNull added in v0.5.0

func NewConstNull(typ types.Type, length int, mp *mpool.MPool) *Vector

func NewVec added in v0.8.0

func NewVec(typ types.Type) *Vector

func ProtoVectorToVector added in v0.6.0

func ProtoVectorToVector(vec *api.Vector) (*Vector, error)

func (*Vector) AllNull added in v0.8.0

func (v *Vector) AllNull() bool

func (*Vector) Allocated added in v0.8.0

func (v *Vector) Allocated() int

Allocated returns the total allocated memory size of the vector. it can be used to estimate the memory usage of the vector.

func (*Vector) Capacity added in v0.8.0

func (v *Vector) Capacity() int

func (*Vector) CleanOnlyData added in v0.8.0

func (v *Vector) CleanOnlyData()

func (*Vector) CloneWindow added in v0.8.0

func (v *Vector) CloneWindow(start, end int, mp *mpool.MPool) (*Vector, error)

CloneWindow Deep copies the content from start to end into another vector. Afterwise it's safe to destroy the original one.

func (*Vector) CloneWindowTo added in v0.8.0

func (v *Vector) CloneWindowTo(w *Vector, start, end int, mp *mpool.MPool) error

func (*Vector) CompareAndCheckAnyResultIsTrue added in v0.6.0

func (v *Vector) CompareAndCheckAnyResultIsTrue(ctx context.Context, vec *Vector, funName string) (bool, error)

CompareAndCheckAnyResultIsTrue we use this method for eval expr by zonemap funName must be ">,<,>=,<="

func (*Vector) CompareAndCheckIntersect added in v0.6.0

func (v *Vector) CompareAndCheckIntersect(vec *Vector) (bool, error)

CompareAndCheckIntersect we use this method for eval expr by zonemap

func (*Vector) Copy added in v0.8.0

func (v *Vector) Copy(w *Vector, vi, wi int64, mp *mpool.MPool) error

XXX Old Copy is FUBAR. Copy simply does v[vi] = w[wi]

func (*Vector) Dup added in v0.8.0

func (v *Vector) Dup(mp *mpool.MPool) (*Vector, error)

Dup use to copy an identical vector

func (*Vector) Free added in v0.5.0

func (v *Vector) Free(mp *mpool.MPool)

func (*Vector) GetArea added in v0.6.0

func (v *Vector) GetArea() []byte

func (*Vector) GetBytesAt added in v0.8.0

func (v *Vector) GetBytesAt(i int) []byte

func (*Vector) GetIsBin added in v0.6.0

func (v *Vector) GetIsBin() bool

func (*Vector) GetMinMaxValue added in v0.8.0

func (v *Vector) GetMinMaxValue() (ok bool, minv, maxv []byte)

GetMinMaxValue returns the min and max value of the vector. if the length is 0 or all null, return false

func (*Vector) GetNulls added in v0.5.1

func (v *Vector) GetNulls() *nulls.Nulls

func (*Vector) GetRawBytesAt added in v0.8.0

func (v *Vector) GetRawBytesAt(i int) []byte

func (*Vector) GetSorted added in v0.8.0

func (v *Vector) GetSorted() bool

func (*Vector) GetStringAt added in v0.8.0

func (v *Vector) GetStringAt(i int) string

func (*Vector) GetSumValue added in v1.0.0

func (v *Vector) GetSumValue() (ok bool, sumv []byte)

GetSumValue returns the sum value of the vector. if the length is 0 or all null or the vector is not numeric, return false

func (*Vector) GetType added in v0.5.1

func (v *Vector) GetType() *types.Type

func (*Vector) HasNull added in v0.8.0

func (v *Vector) HasNull() bool

func (*Vector) IsConst added in v0.5.0

func (v *Vector) IsConst() bool

func (*Vector) IsConstNull added in v0.8.0

func (v *Vector) IsConstNull() bool

IsConstNull return true if the vector means a scalar Null. e.g.

a + Null, and the vector of right part will return true

func (*Vector) IsNull added in v0.8.0

func (v *Vector) IsNull(i uint64) bool

func (*Vector) Length added in v0.5.0

func (v *Vector) Length() int

func (*Vector) MarshalBinary added in v0.6.0

func (v *Vector) MarshalBinary() ([]byte, error)

func (*Vector) MarshalBinaryWithBuffer added in v0.8.0

func (v *Vector) MarshalBinaryWithBuffer(buf *bytes.Buffer) error

func (*Vector) NeedDup added in v0.8.0

func (v *Vector) NeedDup() bool

func (*Vector) PreExtend added in v0.8.0

func (v *Vector) PreExtend(rows int, mp *mpool.MPool) error

PreExtend use to expand the capacity of the vector

func (*Vector) Reset added in v0.8.0

func (v *Vector) Reset(typ types.Type)

func (*Vector) ResetArea added in v0.8.0

func (v *Vector) ResetArea()

func (*Vector) ResetWithNewType added in v0.8.0

func (v *Vector) ResetWithNewType(t *types.Type)

TODO: It is semantically same as Reset, need to merge them later.

func (*Vector) SetArea added in v0.8.0

func (v *Vector) SetArea(a []byte)

func (*Vector) SetClass added in v0.8.0

func (v *Vector) SetClass(class int)

func (*Vector) SetIsBin added in v0.6.0

func (v *Vector) SetIsBin(isBin bool)

func (*Vector) SetLength added in v0.8.0

func (v *Vector) SetLength(n int)

func (*Vector) SetNulls added in v0.8.0

func (v *Vector) SetNulls(nsp *nulls.Nulls)

func (*Vector) SetSorted added in v0.8.0

func (v *Vector) SetSorted(b bool)

func (*Vector) SetType added in v0.8.0

func (v *Vector) SetType(typ types.Type)

func (*Vector) Shrink added in v0.8.0

func (v *Vector) Shrink(sels []int64, negate bool)

Shrink use to shrink vectors, sels must be guaranteed to be ordered

func (*Vector) Shuffle added in v0.8.0

func (v *Vector) Shuffle(sels []int64, mp *mpool.MPool) error

Shuffle use to shrink vectors, sels can be disordered

func (*Vector) Size added in v0.6.0

func (v *Vector) Size() int

Size of data, I think this function is inherently broken. This Size is not meaningful other than used in (approximate) memory accounting.

func (*Vector) String

func (v *Vector) String() string

String function is used to visually display the vector, which is used to implement the Printf interface

func (*Vector) ToConst added in v0.5.0

func (v *Vector) ToConst(row, length int, mp *mpool.MPool) *Vector

func (*Vector) Union added in v0.8.0

func (v *Vector) Union(w *Vector, sels []int32, mp *mpool.MPool) error

func (*Vector) UnionBatch added in v0.8.0

func (v *Vector) UnionBatch(w *Vector, offset int64, cnt int, flags []uint8, mp *mpool.MPool) error

func (*Vector) UnionMulti added in v0.8.0

func (v *Vector) UnionMulti(w *Vector, sel int64, cnt int, mp *mpool.MPool) error

It is simply append. the purpose of retention is ease of use

func (*Vector) UnionNull added in v0.8.0

func (v *Vector) UnionNull(mp *mpool.MPool) error

func (*Vector) UnionOne added in v0.8.0

func (v *Vector) UnionOne(w *Vector, sel int64, mp *mpool.MPool) error

It is simply append. the purpose of retention is ease of use

func (*Vector) UnmarshalBinary added in v0.6.0

func (v *Vector) UnmarshalBinary(data []byte) error

func (*Vector) UnmarshalBinaryWithCopy added in v0.8.0

func (v *Vector) UnmarshalBinaryWithCopy(data []byte, mp *mpool.MPool) error

func (*Vector) UnsafeGetRawData added in v0.8.0

func (v *Vector) UnsafeGetRawData() []byte

func (*Vector) Window added in v0.8.0

func (v *Vector) Window(start, end int) (*Vector, error)

Window returns a "window" into the Vec. It selects a half-open range (i.e.[start, end)). The returned object is NOT allowed to be modified ( TODO: Nulls are deep copied.

Jump to

Keyboard shortcuts

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