Documentation
¶
Index ¶
- Constants
- func AppendAny(vec *Vector, val any, isNull bool, mp *mpool.MPool) error
- func AppendArray[T types.RealNumbers](vec *Vector, val []T, isNull bool, mp *mpool.MPool) error
- func AppendArrayList[T types.RealNumbers](vec *Vector, ws [][]T, isNulls []bool, mp *mpool.MPool) error
- func AppendByteJson(vec *Vector, bj bytejson.ByteJson, isNull bool, mp *mpool.MPool) error
- func AppendBytes(vec *Vector, val []byte, isNull bool, mp *mpool.MPool) error
- func AppendBytesList(vec *Vector, ws [][]byte, isNulls []bool, mp *mpool.MPool) error
- func AppendFixed[T any](vec *Vector, val T, isNull bool, mp *mpool.MPool) error
- func AppendFixedList[T any](vec *Vector, ws []T, isNulls []bool, mp *mpool.MPool) error
- func AppendMultiBytes(vec *Vector, vals []byte, isNull bool, cnt int, mp *mpool.MPool) error
- func AppendMultiFixed[T any](vec *Vector, vals T, isNull bool, cnt int, mp *mpool.MPool) error
- func AppendNull(vec *Vector, mp *mpool.MPool) error
- func AppendStringList(vec *Vector, ws []string, isNulls []bool, mp *mpool.MPool) error
- func ArrayGetMinMax[T types.RealNumbers](vec *Vector) (minv, maxv []T)
- func BuildVarlenaFromArray[T types.RealNumbers](vec *Vector, v *types.Varlena, array *[]T, m *mpool.MPool) error
- func BuildVarlenaFromByteJson(vec *Vector, v *types.Varlena, bj bytejson.ByteJson, m *mpool.MPool) error
- func BuildVarlenaFromByteSlice(vec *Vector, v *types.Varlena, bs *[]byte, m *mpool.MPool) error
- func BuildVarlenaFromVarlena(vec *Vector, v1, v2 *types.Varlena, area *[]byte, m *mpool.MPool) error
- func BuildVarlenaInline(v1, v2 *types.Varlena)
- func BuildVarlenaNoInline(vec *Vector, v1 *types.Varlena, bs *[]byte, m *mpool.MPool) error
- func BuildVarlenaNoInlineFromByteJson(vec *Vector, v1 *types.Varlena, bj bytejson.ByteJson, m *mpool.MPool) error
- func CollectOffsetsByBetweenFactory[T types.BuiltinNumber | types.Times | types.Enum](lval, rval T, hint uint8) func(*Vector) []int64
- func CollectOffsetsByBetweenString(lval, rval string, hint uint8) func(*Vector) []int64
- func CollectOffsetsByBetweenWithCompareFactory[T types.Decimal | types.Uuid](lval, rval T, cmp func(T, T) int) func(*Vector) []int64
- func CollectOffsetsByPrefixBetweenFactory(lval, rval []byte) func(*Vector) []int64
- func CollectOffsetsByPrefixEqFactory(val []byte) func(*Vector) []int64
- func CollectOffsetsByPrefixInFactory(rvec *Vector) func(*Vector) []int64
- func CollectOffsetsByPrefixInRangeFactory(lb, ub []byte, hint uint8) func(*Vector) []int64
- func Decimal64GetSum(vec *Vector) (sum types.Decimal64)
- func ExpandBytesCol(v *Vector) [][]byte
- func ExpandFixedCol[T any](v *Vector) []T
- func ExpandStrCol(v *Vector) []string
- func FindFirstIndexInSortedVarlenVector(vec *Vector, v []byte) int
- func FixedSizeFindFirstIndexInSortedSliceWithCompare[T types.FixedSizeTExceptStrType](v T, s []T, compare func(T, T) int) int
- func FixedSizeGetMinMax[T types.OrderedT](vec *Vector, comp func(T, T) int64) (minv, maxv T)
- func FixedSizeLinearSearchOffsetByValFactory[T types.Decimal128 | types.Decimal64 | types.Uuid](vals []T, cmp func(T, T) int) func(*Vector) []int64
- func FixedSizeSearchOffsetsByGTTypeChecked[T types.Decimal128 | types.Decimal64 | types.Uuid](lb T, closed bool, quick bool, cmp func(a, b T) int) func(vector *Vector) []int64
- func FixedSizeSearchOffsetsByLessTypeChecked[T types.Decimal128 | types.Decimal64 | types.Uuid](ub T, closed bool, quick bool, cmp func(a, b T) int) func(vector *Vector) []int64
- func FixedSizedBinarySearchOffsetByValFactory[T any](vals []T, cmp func(T, T) int) func(*Vector) []int64
- func FixedSizedLinearCollectOffsetsByBetweenFactory[T types.Decimal128 | types.Decimal64 | types.Uuid](lb, ub T, cmp func(T, T) int) func(*Vector) []int64
- func FloatGetSum[T types.Floats](vec *Vector) (sum float64)
- func GetAndClearVecArea(v *Vector) []byte
- func GetAndClearVecData(v *Vector) []byte
- func GetAny(vec *Vector, i int, deepCopy bool) any
- func GetArrayAt[T types.RealNumbers](v *Vector, i int) []T
- func GetArrayAt2[T types.RealNumbers](v *Vector, bs []types.Varlena, i int) []T
- func GetConstSetFunction(typ types.Type, mp *mpool.MPool) func(v, w *Vector, sel int64, length int) error
- func GetFixedAtNoTypeCheck[T any](v *Vector, idx int) T
- func GetFixedAtWithTypeCheck[T any](v *Vector, idx int) T
- func GetPtrAt[T any](v *Vector, idx int64) *T
- func GetSels() []int64
- func GetUnionAllFunction(typ types.Type, mp *mpool.MPool) func(v, w *Vector) error
- func InefficientMustBytesCol(v *Vector) [][]byte
- func InefficientMustStrCol(v *Vector) []string
- func IntegerGetSum[T types.Ints | types.UInts, U int64 | uint64](vec *Vector) (sum U)
- func Intersection2VectorOrdered[T types.OrderedT | types.Decimal128](a, b []T, ret *Vector, mp *mpool.MPool, cmp func(x, y T) int) (err error)
- func Intersection2VectorVarlen(va, vb *Vector, ret *Vector, mp *mpool.MPool) (err error)
- func LinearCollectOffsetsByBetweenFactory[T types.BuiltinNumber | types.Times | types.Enum](lb, ub T, hint uint8) func(*Vector) []int64
- func LinearCollectOffsetsByBetweenString(lb, ub string, hint uint8) func(*Vector) []int64
- func LinearCollectOffsetsByPrefixBetweenFactory(lb, ub []byte) func(*Vector) []int64
- func LinearCollectOffsetsByPrefixEqFactory(val []byte) func(*Vector) []int64
- func LinearCollectOffsetsByPrefixInFactory(rvec *Vector) func(*Vector) []int64
- func LinearCollectOffsetsByPrefixInRangeFactory(lb, ub []byte, hint uint8) func(*Vector) []int64
- func MakeAppendBytesFunc(vec *Vector) func([]byte, bool, *mpool.MPool) error
- func MustArrayCol[T types.RealNumbers](v *Vector) [][]T
- func MustFixedColAsSlice[T any](v *Vector, n int) []T
- func MustFixedColNoTypeCheck[T any](v *Vector) (ret []T)
- func MustFixedColWithTypeCheck[T any](v *Vector) (ret []T)
- func MustVarlenaRawData(v *Vector) (data []types.Varlena, area []byte)
- func MustVarlenaToInt64Slice(v *Vector) [][3]int64
- func OrderedBinarySearchOffsetByValFactory[T types.OrderedT](vals []T) func(*Vector) []int64
- func OrderedFindFirstIndexInSortedSlice[T types.OrderedT](v T, s []T) int
- func OrderedGetMinAndMax[T types.OrderedT](vec *Vector) (minv, maxv T)
- func OrderedLinearSearchOffsetByValFactory[T types.OrderedT | types.Decimal128 | types.Decimal64 | types.Uuid](vals []T, cmp func(T, T) int) func(*Vector) []int64
- func OrderedSearchOffsetsByGreat[T types.OrderedT](lb T, closed bool, quick bool) func(vector *Vector) []int64
- func OrderedSearchOffsetsByLess[T types.OrderedT](ub T, closed bool, quick bool) func(vector *Vector) []int64
- func ProtoTypeToType(typ plan.Type) types.Type
- func PutSels(sels []int64)
- func ReuseFunctionFixedTypeParameter[T types.FixedSizeTExceptStrType](v *Vector, f FunctionParameterWrapper[T]) bool
- func ReuseFunctionStrParameter(v *Vector, f FunctionParameterWrapper[types.Varlena]) bool
- func SetBytesAt(v *Vector, idx int, bs []byte, mp *mpool.MPool) error
- func SetConstArray[T types.RealNumbers](vec *Vector, val []T, length int, mp *mpool.MPool) error
- func SetConstByteJson(vec *Vector, bj bytejson.ByteJson, length int, mp *mpool.MPool) error
- func SetConstBytes(vec *Vector, val []byte, length int, mp *mpool.MPool) error
- func SetConstFixed[T any](vec *Vector, val T, length int, mp *mpool.MPool) error
- func SetConstNull(vec *Vector, length int, mp *mpool.MPool) error
- func SetFixedAtNoTypeCheck[T types.FixedSizeT](v *Vector, idx int, t T) error
- func SetFixedAtWithTypeCheck[T types.FixedSizeT](v *Vector, idx int, t T) error
- func SetStringAt(v *Vector, idx int, bs string, mp *mpool.MPool) error
- func SetVecArea(v *Vector, area []byte)
- func SetVecData(v *Vector, data []byte)
- func ToFixedCol[T any](v *Vector, ret *[]T)
- func ToFixedColNoTypeCheck[T any](v *Vector, ret *[]T)
- func ToSlice[T any](vec *Vector, ret *[]T)
- func ToSliceNoTypeCheck[T any](vec *Vector, ret *[]T)
- func ToSliceNoTypeCheck2[T any](vec *Vector) []T
- func TypeToProtoType(typ types.Type) plan.Type
- func Union2VectorOrdered[T types.OrderedT | types.Decimal128](a, b []T, ret *Vector, mp *mpool.MPool, cmp func(x, y T) int) (err error)
- func Union2VectorValen(va, vb *Vector, ret *Vector, mp *mpool.MPool) (err error)
- func VarlenBinarySearchOffsetByValFactory(vals [][]byte) func(*Vector) []int64
- func VarlenGetMinMax(vec *Vector) (minv, maxv []byte)
- func VarlenLinearSearchOffsetByValFactory(vals [][]byte) func(*Vector) []int64
- func VarlenSearchOffsetByGreat(lb []byte, closed bool, quick bool) func(*Vector) []int64
- func VarlenSearchOffsetByLess(ub []byte, closed bool, quick bool) func(*Vector) []int64
- func VectorToProtoVector(vec *Vector) (ret api.Vector, err error)
- type FunctionParameterNormal
- func (p *FunctionParameterNormal[T]) GetSourceVector() *Vector
- func (p *FunctionParameterNormal[T]) GetStrValue(idx uint64) (value []byte, isNull bool)
- func (p *FunctionParameterNormal[T]) GetType() types.Type
- func (p *FunctionParameterNormal[T]) GetValue(idx uint64) (value T, isNull bool)
- func (p *FunctionParameterNormal[T]) UnSafeGetAllValue() []T
- func (p *FunctionParameterNormal[T]) WithAnyNullValue() bool
- type FunctionParameterNormalSpecial1
- func (p *FunctionParameterNormalSpecial1[T]) GetSourceVector() *Vector
- func (p *FunctionParameterNormalSpecial1[T]) GetStrValue(idx uint64) ([]byte, bool)
- func (p *FunctionParameterNormalSpecial1[T]) GetType() types.Type
- func (p *FunctionParameterNormalSpecial1[T]) GetValue(_ uint64) (T, bool)
- func (p *FunctionParameterNormalSpecial1[T]) UnSafeGetAllValue() []T
- func (p *FunctionParameterNormalSpecial1[T]) WithAnyNullValue() bool
- type FunctionParameterScalar
- func (p *FunctionParameterScalar[T]) GetSourceVector() *Vector
- func (p *FunctionParameterScalar[T]) GetStrValue(_ uint64) ([]byte, bool)
- func (p *FunctionParameterScalar[T]) GetType() types.Type
- func (p *FunctionParameterScalar[T]) GetValue(_ uint64) (T, bool)
- func (p *FunctionParameterScalar[T]) UnSafeGetAllValue() []T
- func (p *FunctionParameterScalar[T]) WithAnyNullValue() bool
- type FunctionParameterScalarNull
- func (p *FunctionParameterScalarNull[T]) GetSourceVector() *Vector
- func (p *FunctionParameterScalarNull[T]) GetStrValue(_ uint64) ([]byte, bool)
- func (p *FunctionParameterScalarNull[T]) GetType() types.Type
- func (p *FunctionParameterScalarNull[T]) GetValue(_ uint64) (value T, isNull bool)
- func (p *FunctionParameterScalarNull[T]) UnSafeGetAllValue() []T
- func (p *FunctionParameterScalarNull[T]) WithAnyNullValue() bool
- type FunctionParameterWithoutNull
- func (p *FunctionParameterWithoutNull[T]) GetSourceVector() *Vector
- func (p *FunctionParameterWithoutNull[T]) GetStrValue(idx uint64) ([]byte, bool)
- func (p *FunctionParameterWithoutNull[T]) GetType() types.Type
- func (p *FunctionParameterWithoutNull[T]) GetValue(idx uint64) (T, bool)
- func (p *FunctionParameterWithoutNull[T]) UnSafeGetAllValue() []T
- func (p *FunctionParameterWithoutNull[T]) WithAnyNullValue() bool
- type FunctionParameterWithoutNullSpecial1
- func (p *FunctionParameterWithoutNullSpecial1[T]) GetSourceVector() *Vector
- func (p *FunctionParameterWithoutNullSpecial1[T]) GetStrValue(idx uint64) ([]byte, bool)
- func (p *FunctionParameterWithoutNullSpecial1[T]) GetType() types.Type
- func (p *FunctionParameterWithoutNullSpecial1[T]) GetValue(_ uint64) (T, bool)
- func (p *FunctionParameterWithoutNullSpecial1[T]) UnSafeGetAllValue() []T
- func (p *FunctionParameterWithoutNullSpecial1[T]) WithAnyNullValue() bool
- type FunctionParameterWrapper
- func GenerateFunctionFixedTypeParameter[T types.FixedSizeTExceptStrType](v *Vector) FunctionParameterWrapper[T]
- func GenerateFunctionStrParameter(v *Vector) FunctionParameterWrapper[types.Varlena]
- func OptGetBytesParamFromWrapper(wrapper FunctionResultWrapper, idx int, src *Vector) FunctionParameterWrapper[types.Varlena]
- func OptGetParamFromWrapper[ParamType types.FixedSizeTExceptStrType](wrapper FunctionResultWrapper, idx int, src *Vector) FunctionParameterWrapper[ParamType]
- type FunctionResult
- func (fr *FunctionResult[T]) AddNullAt(idx uint64)
- func (fr *FunctionResult[T]) AddNullRange(start, end uint64)
- func (fr *FunctionResult[T]) AddNulls(ns *nulls.Nulls)
- func (fr *FunctionResult[T]) Append(val T, isnull bool) error
- func (fr *FunctionResult[T]) AppendByteJson(bj bytejson.ByteJson, isnull bool) error
- func (fr *FunctionResult[T]) AppendBytes(val []byte, isnull bool) error
- func (fr *FunctionResult[T]) AppendMustBytesValue(val []byte) error
- func (fr *FunctionResult[T]) AppendMustNull()
- func (fr *FunctionResult[T]) AppendMustNullForBytesResult() error
- func (fr *FunctionResult[T]) AppendMustValue(val T)
- func (fr *FunctionResult[T]) ConvertToStrParameter() FunctionParameterWrapper[types.Varlena]
- func (fr *FunctionResult[T]) DupFromParameter(fp FunctionParameterWrapper[T], length int) (err error)
- func (fr *FunctionResult[T]) Free()
- func (fr *FunctionResult[T]) GetNullAt(idx uint64) bool
- func (fr *FunctionResult[T]) GetResultVector() *Vector
- func (fr *FunctionResult[T]) GetType() types.Type
- func (fr *FunctionResult[T]) PreExtendAndReset(targetSize int) error
- func (fr *FunctionResult[T]) SetNullResult(length uint64)
- func (fr *FunctionResult[T]) SetResultVector(v *Vector)
- func (fr *FunctionResult[T]) TempSetType(t types.Type)
- func (fr *FunctionResult[T]) UseOptFunctionParamFrame(paramCount int)
- type FunctionResultWrapper
- type OptFunctionResultWrapper
- type Vector
- func NewConstArray[T types.RealNumbers](typ types.Type, val []T, length int, mp *mpool.MPool) (vec *Vector, err error)
- func NewConstBytes(typ types.Type, val []byte, length int, mp *mpool.MPool) (vec *Vector, err error)
- func NewConstFixed[T any](typ types.Type, val T, length int, mp *mpool.MPool) (vec *Vector, err error)
- func NewConstNull(typ types.Type, length int, mp *mpool.MPool) *Vector
- func NewOffHeapVec() *Vector
- func NewOffHeapVecWithType(typ types.Type) *Vector
- func NewOffHeapVecWithTypeAndData(typ types.Type, data []byte, length, cap int) *Vector
- func NewRollupConst(typ types.Type, length int, mp *mpool.MPool) *Vector
- func NewVec(typ types.Type) *Vector
- func NewVecFromReuse() *Vector
- func NewVecWithData(typ types.Type, length int, data []byte, area []byte) *Vector
- func ProtoVectorToVector(vec api.Vector) (*Vector, error)
- func (v *Vector) AllNull() bool
- func (v *Vector) Allocated() int
- func (v *Vector) Capacity() int
- func (v *Vector) CleanOnlyData()
- func (v *Vector) CloneBytesAt(i int) []byte
- func (v *Vector) CloneWindow(start, end int, mp *mpool.MPool) (*Vector, error)
- func (v *Vector) CloneWindowTo(w *Vector, start, end int, mp *mpool.MPool) error
- func (v *Vector) Copy(w *Vector, vi, wi int64, mp *mpool.MPool) error
- func (v *Vector) Dup(mp *mpool.MPool) (*Vector, error)
- func (v *Vector) FillRawPtrLen(dest []uintptr)
- func (v *Vector) Free(mp *mpool.MPool)
- func (v *Vector) GetArea() []byte
- func (v *Vector) GetBytesAt(i int) []byte
- func (v *Vector) GetBytesAt2(bs []types.Varlena, i int) []byte
- func (v *Vector) GetData() []byte
- func (v *Vector) GetGrouping() *nulls.Nulls
- func (v *Vector) GetIsBin() bool
- func (v *Vector) GetMinMaxValue() (ok bool, minv, maxv []byte)
- func (v *Vector) GetNulls() *nulls.Nulls
- func (v *Vector) GetRawBytesAt(i int) []byte
- func (v *Vector) GetSorted() bool
- func (v *Vector) GetStringAt(i int) string
- func (v *Vector) GetSumValue() (ok bool, sumv []byte)
- func (v *Vector) GetType() *types.Type
- func (v *Vector) HasGrouping() bool
- func (v *Vector) HasNull() bool
- func (v *Vector) InplaceSort()
- func (v *Vector) InplaceSortAndCompact()
- func (v *Vector) IsConst() bool
- func (v *Vector) IsConstNull() bool
- func (v *Vector) IsGrouping() bool
- func (v *Vector) IsNull(i uint64) bool
- func (v *Vector) Length() int
- func (v *Vector) MarshalBinary() ([]byte, error)
- func (v *Vector) MarshalBinaryWithBuffer(buf *bytes.Buffer) error
- func (v *Vector) MarshalBinaryWithBufferV1(buf *bytes.Buffer) error
- func (v *Vector) NeedDup() bool
- func (v *Vector) PreExtend(rows int, mp *mpool.MPool) error
- func (v *Vector) PreExtendWithArea(rows int, extraAreaSize int, mp *mpool.MPool) error
- func (v *Vector) Reset(typ types.Type)
- func (v *Vector) ResetArea()
- func (v *Vector) ResetWithNewType(t *types.Type)
- func (v *Vector) ResetWithSameType()
- func (v *Vector) RowToString(idx int) string
- func (v *Vector) SetAllNulls(length int)
- func (v *Vector) SetClass(class int)
- func (v *Vector) SetGrouping(gsp *nulls.Nulls)
- func (v *Vector) SetIsBin(isBin bool)
- func (v *Vector) SetLength(n int)
- func (v *Vector) SetNull(i uint64)
- func (v *Vector) SetNulls(nsp *nulls.Nulls)
- func (v *Vector) SetOffHeap(offHeap bool)
- func (v *Vector) SetRawBytesAt(i int, bs []byte, mp *mpool.MPool) error
- func (v *Vector) SetSorted(b bool)
- func (v *Vector) SetType(typ types.Type)
- func (v *Vector) SetTypeAndFixData(typ types.Type, mp *mpool.MPool)
- func (v *Vector) SetTypeScale(scale int32)
- func (v *Vector) Shrink(sels []int64, negate bool)
- func (v *Vector) ShrinkByMask(sels *bitmap.Bitmap, negate bool, offset uint64)
- func (v *Vector) Shuffle(sels []int64, mp *mpool.MPool) (err error)
- func (v *Vector) ShuffleWithBuf(sels []int64, mp *mpool.MPool, buf *[]byte) (err error)
- func (v *Vector) Size() int
- func (v *Vector) String() string
- func (v *Vector) ToConst()
- func (v Vector) TypeName() string
- func (v *Vector) Union(w *Vector, sels []int64, mp *mpool.MPool) error
- func (v *Vector) UnionBatch(w *Vector, offset int64, cnt int, flags []uint8, mp *mpool.MPool) error
- func (v *Vector) UnionInt32(w *Vector, sels []int32, mp *mpool.MPool) error
- func (v *Vector) UnionMulti(w *Vector, sel int64, cnt int, mp *mpool.MPool) error
- func (v *Vector) UnionNull(mp *mpool.MPool) error
- func (v *Vector) UnionOne(w *Vector, sel int64, mp *mpool.MPool) error
- func (v *Vector) UnmarshalBinary(data []byte) error
- func (v *Vector) UnmarshalBinaryV1(data []byte) error
- func (v *Vector) UnmarshalBinaryWithCopy(data []byte, mp *mpool.MPool) error
- func (v *Vector) UnmarshalWithReader(r io.Reader, mp *mpool.MPool) error
- func (v *Vector) UnsafeGetRawData() []byte
- func (v *Vector) UnsafeGetStringAt(i int) string
- func (v *Vector) UnsetNull(i uint64)
- func (v *Vector) Window(start, end int) (*Vector, error)
Constants ¶
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
WARNING: AppendAny() append value with any type will cause memory escape to heap which will result in slow GC. If you know the actual type, better use the AppendFixed() to append the values. Only use when you have no choice, e.g. you are dealing with column with any type that don't know in advanced.
func AppendArray ¶ added in v1.1.0
AppendArray mainly used in tests
func AppendArrayList ¶ added in v1.1.0
func AppendArrayList[T types.RealNumbers](vec *Vector, ws [][]T, isNulls []bool, mp *mpool.MPool) error
AppendArrayList mainly used in unit tests
func AppendByteJson ¶ added in v1.2.3
func AppendBytes ¶ added in v0.6.0
func AppendBytesList ¶ added in v0.8.0
func AppendFixed ¶ added in v0.6.0
func AppendFixedList ¶ added in v0.8.0
func AppendMultiBytes ¶ added in v0.8.0
func AppendMultiFixed ¶ added in v0.8.0
func AppendStringList ¶ added in v0.8.0
func ArrayGetMinMax ¶ added in v1.1.0
func ArrayGetMinMax[T types.RealNumbers](vec *Vector) (minv, maxv []T)
func BuildVarlenaFromArray ¶ added in v1.1.0
func BuildVarlenaFromArray[T types.RealNumbers](vec *Vector, v *types.Varlena, array *[]T, m *mpool.MPool) error
BuildVarlenaFromArray convert array to Varlena so that it can be stored in the vector
func BuildVarlenaFromByteJson ¶ added in v1.2.3
func BuildVarlenaFromByteSlice ¶ added in v1.0.0
func BuildVarlenaFromVarlena ¶
func BuildVarlenaInline ¶ added in v1.0.0
func BuildVarlenaNoInline ¶ added in v1.0.0
func BuildVarlenaNoInlineFromByteJson ¶ added in v1.2.3
func CollectOffsetsByBetweenFactory ¶ added in v1.2.1
func CollectOffsetsByBetweenWithCompareFactory ¶ added in v1.2.1
func CollectOffsetsByPrefixBetweenFactory ¶ added in v1.1.3
func CollectOffsetsByPrefixEqFactory ¶ added in v1.1.3
func CollectOffsetsByPrefixInFactory ¶ added in v1.1.3
CollectOffsetsByPrefixInFactory builds a "prefix IN" probe: for each row of lvec it emits that row's offset when some entry of the captured rvec is a prefix of it (types.PrefixCompare == 0). Each matching row is emitted once, and offsets come back in ascending order.
PRECONDITION: both lvec (the data column) and rvec (the needles) MUST be sorted ascending. The routine is a single forward merge with galloping over runs of non-matching rows, which is correct ONLY on sorted input. This contract is enforced by the caller, not checked here, on both sides:
- lvec (the block column) is sorted because this is wired exclusively as a SortedSearchFunc, reached only via BlockReadFilter.DecideSearchFunc when the block metadata reports IsSorted(); unsorted (or fake-PK) blocks are routed to the brute-force LinearCollectOffsetsByPrefixInFactory, which needs no ordering.
- rvec (the needles) is the planner-built IN-list, normalized to ascending order at construction (InplaceSortAndCompact, tracked by the vector's GetSorted flag) — the same guarantee the binary-search IN filter and the zone-map PrefixIn rely on.
Do not call this directly on data that is not known to be sorted.
func Decimal64GetSum ¶ added in v1.0.0
func ExpandBytesCol ¶ added in v0.8.0
func ExpandFixedCol ¶ added in v0.8.0
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 FindFirstIndexInSortedVarlenVector ¶ added in v0.8.0
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 FixedSizeLinearSearchOffsetByValFactory ¶ added in v1.2.1
func FixedSizedBinarySearchOffsetByValFactory ¶ added in v1.0.0
func FixedSizedLinearCollectOffsetsByBetweenFactory ¶ added in v1.2.1
func FloatGetSum ¶ added in v1.0.0
FloatGetSum get the sum the vector if the vector type is float.
func GetAndClearVecArea ¶
GetAndClearVecArea is a dangerous function that may cause data leakage.
func GetAndClearVecData ¶
GetAndClearVecData is a dangerous function that may cause data leakage.
func GetAny ¶
WARNING: GetAny() return value with any type will cause memory escape to heap which will result in slow GC. If you know the actual type, better use the GetFixedAtWithTypeCheck() to get the values. Only use when you have no choice, e.g. you are dealing with column with any type that don't know in advanced.
func GetArrayAt ¶ added in v1.1.0
func GetArrayAt[T types.RealNumbers](v *Vector, i int) []T
GetArrayAt Returns []T at the specific index of the vector
func GetArrayAt2 ¶
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 GetFixedAtNoTypeCheck ¶
make sure the type check is done before calling this function
func GetFixedAtWithTypeCheck ¶
Note: it is much inefficient than GetFixedAtNoTypeCheck if type check is done before calling this function, use GetFixedAtNoTypeCheck
func GetUnionAllFunction ¶ added in v0.8.0
GetUnionAllFunction: A more sensible function for copying vector, which avoids having to do type conversions and type judgements every time you append.
func InefficientMustBytesCol ¶ added in v1.2.3
InefficientMustBytesCol It should only be used for debugging purposes or in cases where performance is not a critical factor. The function performs a potentially slow and memory-intensive operation to extract the byte representation of the column. Avoid using this function in scenarios where speed is important.
vs, area := vector.MustVarlenaRawData(vec)
for i := range vs {
vs[i].GetByteSlice(area)
}
func InefficientMustStrCol ¶ added in v1.2.3
InefficientMustStrCol It should only be used for debugging purposes or in cases where performance is not a critical factor. The function performs a potentially slow and memory-intensive operation to extract the byte representation of the column. Avoid using this function in scenarios where speed is important.
vs, area := vector.MustVarlenaRawData(vec)
for i := range vs {
vs[i].UnsafeGetString(area)
}
todo: There is a bug here. If the vector is reused, that is, the initial value of Varlena is not 0, it will cause the UnsafeGetString method to panic. This is because what is stored here is the offset of the last value. and InefficientMustBytesCol has a same bug.
func IntegerGetSum ¶ added in v1.0.0
IntegerGetSum get the sum the vector if the vector type is integer.
func Intersection2VectorOrdered ¶ added in v1.2.1
func Intersection2VectorOrdered[T types.OrderedT | types.Decimal128]( a, b []T, ret *Vector, mp *mpool.MPool, cmp func(x, y T) int) (err error)
Intersection2VectorOrdered does a ∩ b ==> ret, keeps all item unique and sorted it assumes that a and b all sorted already
func Intersection2VectorVarlen ¶ added in v1.2.1
Intersection2VectorVarlen does a ∩ b ==> ret, keeps all item unique and sorted it assumes that va and vb all sorted already
func LinearCollectOffsetsByBetweenFactory ¶ added in v1.2.1
func LinearCollectOffsetsByPrefixBetweenFactory ¶ added in v1.2.1
func LinearCollectOffsetsByPrefixEqFactory ¶ added in v1.2.1
func LinearCollectOffsetsByPrefixInFactory ¶ added in v1.2.1
func MakeAppendBytesFunc ¶ added in v0.8.0
func MustArrayCol ¶ added in v1.1.0
func MustArrayCol[T types.RealNumbers](v *Vector) [][]T
MustArrayCol Converts Vector<[]T> to [][]T
func MustFixedColAsSlice ¶
MustFixedColAsSlice returns the vector's backing data reinterpreted as a []T with length n, ignoring the vector's logical length. The caller must ensure n does not exceed the allocated capacity. Used by aggregation executors for bounds-check-eliminated array access via (*[N]T)(slice) conversion.
func MustFixedColNoTypeCheck ¶
func MustVarlenaRawData ¶ added in v0.6.0
func MustVarlenaToInt64Slice ¶ added in v1.0.0
func OrderedBinarySearchOffsetByValFactory ¶ added in v0.8.0
func OrderedFindFirstIndexInSortedSlice ¶ added in v0.8.0
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
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 OrderedLinearSearchOffsetByValFactory ¶ added in v1.2.1
func OrderedSearchOffsetsByGreat ¶ added in v1.2.1
func OrderedSearchOffsetsByLess ¶ added in v1.2.1
func ReuseFunctionFixedTypeParameter ¶
func ReuseFunctionFixedTypeParameter[T types.FixedSizeTExceptStrType](v *Vector, f FunctionParameterWrapper[T]) bool
func ReuseFunctionStrParameter ¶
func ReuseFunctionStrParameter(v *Vector, f FunctionParameterWrapper[types.Varlena]) bool
func SetBytesAt ¶ added in v0.6.0
func SetConstArray ¶ added in v1.1.0
SetConstArray set current vector as Constant_Array vector of given length.
func SetConstByteJson ¶ added in v1.2.3
func SetConstBytes ¶ added in v0.8.0
func SetConstFixed ¶ added in v0.8.0
func SetConstNull ¶ added in v0.8.0
func SetFixedAtNoTypeCheck ¶
func SetFixedAtNoTypeCheck[T types.FixedSizeT](v *Vector, idx int, t T) error
call this function if type already checked
func SetFixedAtWithTypeCheck ¶
func SetFixedAtWithTypeCheck[T types.FixedSizeT](v *Vector, idx int, t T) error
Note: it is 10x slower than SetFixedAtNoTypeCheck
func SetStringAt ¶ added in v0.6.0
func SetVecArea ¶
SetVecArea is dangerous and should be used with caution.
func SetVecData ¶
SetVecData is dangerous and should be used with caution.
func ToFixedCol ¶ added in v1.1.0
func ToFixedColNoTypeCheck ¶
func ToSliceNoTypeCheck ¶
func ToSliceNoTypeCheck2 ¶
func Union2VectorOrdered ¶ added in v1.2.1
func Union2VectorOrdered[T types.OrderedT | types.Decimal128]( a, b []T, ret *Vector, mp *mpool.MPool, cmp func(x, y T) int) (err error)
Union2VectorOrdered does a ∪ b ==> ret, keeps all item unique and sorted it assumes that a and b all sorted already
func Union2VectorValen ¶ added in v1.2.1
Union2VectorValen does a ∪ b ==> ret, keeps all item unique and sorted it assumes that va and vb all sorted already
func VarlenBinarySearchOffsetByValFactory ¶ added in v0.8.0
func VarlenGetMinMax ¶ added in v0.8.0
func VarlenLinearSearchOffsetByValFactory ¶ added in v1.2.1
func VarlenSearchOffsetByGreat ¶ added in v1.2.1
func VarlenSearchOffsetByLess ¶ added in v1.2.1
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 (p *FunctionParameterWithoutNullSpecial1[T]) GetType() types.Type
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. //TODO: Later rename it to GetBytes as it makes more sense. 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]
func OptGetBytesParamFromWrapper ¶
func OptGetBytesParamFromWrapper(wrapper FunctionResultWrapper, idx int, src *Vector) FunctionParameterWrapper[types.Varlena]
func OptGetParamFromWrapper ¶
func OptGetParamFromWrapper[ParamType types.FixedSizeTExceptStrType]( wrapper FunctionResultWrapper, idx int, src *Vector) FunctionParameterWrapper[ParamType]
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]) AddNullAt ¶
func (fr *FunctionResult[T]) AddNullAt(idx uint64)
func (*FunctionResult[T]) AddNullRange ¶
func (fr *FunctionResult[T]) AddNullRange(start, end uint64)
func (*FunctionResult[T]) AddNulls ¶
func (fr *FunctionResult[T]) AddNulls(ns *nulls.Nulls)
func (*FunctionResult[T]) Append ¶ added in v0.7.0
func (fr *FunctionResult[T]) Append(val T, isnull bool) error
func (*FunctionResult[T]) AppendByteJson ¶ added in v1.2.3
func (fr *FunctionResult[T]) AppendByteJson(bj bytejson.ByteJson, 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]) GetNullAt ¶
func (fr *FunctionResult[T]) GetNullAt(idx uint64) bool
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(targetSize int) error
func (*FunctionResult[T]) SetNullResult ¶
func (fr *FunctionResult[T]) SetNullResult(length uint64)
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)
func (*FunctionResult[T]) UseOptFunctionParamFrame ¶
func (fr *FunctionResult[T]) UseOptFunctionParamFrame(paramCount int)
type FunctionResultWrapper ¶ added in v0.7.0
type FunctionResultWrapper interface {
OptFunctionResultWrapper
SetResultVector(vec *Vector)
GetResultVector() *Vector
Free()
PreExtendAndReset(size int) error
}
func NewFunctionResultWrapper ¶ added in v0.7.0
func NewFunctionResultWrapper(typ types.Type, mp *mpool.MPool) FunctionResultWrapper
type OptFunctionResultWrapper ¶
type OptFunctionResultWrapper interface {
UseOptFunctionParamFrame(paramCount int)
// contains filtered or unexported methods
}
type Vector ¶
type Vector struct {
// contains filtered or unexported fields
}
Vector represent a column
func NewConstArray ¶ added in v1.1.0
func NewConstArray[T types.RealNumbers](typ types.Type, val []T, length int, mp *mpool.MPool) (vec *Vector, err error)
NewConstArray Creates a Const_Array Vector
func NewConstBytes ¶ added in v0.6.0
func NewConstFixed ¶ added in v0.6.0
func NewConstNull ¶ added in v0.5.0
func NewOffHeapVec ¶
func NewOffHeapVec() *Vector
func NewOffHeapVecWithType ¶
func NewVecFromReuse ¶
func NewVecFromReuse() *Vector
func NewVecWithData ¶
func ProtoVectorToVector ¶ added in v0.6.0
func (*Vector) Allocated ¶ added in v0.8.0
Allocated returns the total allocated memory size of the vector. it can be used to estimate the memory usage of the vector.
func (*Vector) CleanOnlyData ¶ added in v0.8.0
func (v *Vector) CleanOnlyData()
func (*Vector) CloneBytesAt ¶
func (*Vector) CloneWindow ¶ added in v0.8.0
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 (*Vector) FillRawPtrLen ¶
func (*Vector) GetBytesAt ¶ added in v0.8.0
func (*Vector) GetGrouping ¶
func (*Vector) GetMinMaxValue ¶ added in v0.8.0
GetMinMaxValue returns the min and max value of the vector. if the length is 0 or all null, return false
func (*Vector) GetRawBytesAt ¶ added in v0.8.0
func (*Vector) GetSumValue ¶ added in v1.0.0
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) HasGrouping ¶
func (*Vector) InplaceSort ¶ added in v1.2.0
func (v *Vector) InplaceSort()
func (*Vector) InplaceSortAndCompact ¶ added in v1.1.2
func (v *Vector) InplaceSortAndCompact()
InplaceSortAndCompact @todo optimization in the future
func (*Vector) IsConstNull ¶ added in v0.8.0
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) IsGrouping ¶
func (*Vector) MarshalBinary ¶ added in v0.6.0
func (*Vector) MarshalBinaryWithBuffer ¶ added in v0.8.0
func (*Vector) MarshalBinaryWithBufferV1 ¶
MarshalBinaryWithBufferV1 in version 1, vector.nulls.bitmap is v1
func (*Vector) PreExtend ¶ added in v0.8.0
PreExtend use to expand the capacity of the vector. PreExtend does not change the length of the vector.
func (*Vector) PreExtendWithArea ¶
PreExtendArea use to expand the mpool and area of vector extraAreaSize: the size of area to be extended mp: mpool
func (*Vector) Reset ¶ added in v0.8.0
Reset update vector's fields with a specific type. we should redefine the value of capacity and values-ptr because of the possible change in type.
func (*Vector) ResetWithNewType ¶ added in v0.8.0
TODO: It is semantically same as Reset, need to merge them later.
func (*Vector) ResetWithSameType ¶
func (v *Vector) ResetWithSameType()
func (*Vector) RowToString ¶
func (*Vector) SetAllNulls ¶
func (*Vector) SetGrouping ¶
func (*Vector) SetOffHeap ¶
func (*Vector) SetRawBytesAt ¶
func (*Vector) SetType ¶ added in v0.8.0
Bug #23240 This is very dangerous. We changed vector type but did not change the underlying data. So the length and capacity are all messed up.
func (*Vector) SetTypeAndFixData ¶
Bug #23240 Neither this function, nor the SetType function are good Maybe we should just disallow.
func (*Vector) SetTypeScale ¶ added in v1.1.0
func (*Vector) Shrink ¶ added in v0.8.0
Shrink use to shrink vectors, sels must be guaranteed to be ordered
func (*Vector) ShrinkByMask ¶
func (*Vector) ShuffleWithBuf ¶
ShuffleWithBuf is like Shuffle but reuses a scratch buffer to avoid alloc/free churn when the permutation preserves the element count. buf is grown as needed and retained across calls.
func (*Vector) Size ¶ added in v0.6.0
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 ¶
String function is used to visually display the vector, which is used to implement the Printf interface
func (*Vector) UnionBatch ¶ added in v0.8.0
func (*Vector) UnionInt32 ¶
func (*Vector) UnionMulti ¶ added in v0.8.0
It is simply append. the purpose of retention is ease of use
func (*Vector) UnionOne ¶ added in v0.8.0
It is simply append. the purpose of retention is ease of use
func (*Vector) UnmarshalBinary ¶ added in v0.6.0
func (*Vector) UnmarshalBinaryV1 ¶
func (*Vector) UnmarshalBinaryWithCopy ¶ added in v0.8.0
func (*Vector) UnmarshalWithReader ¶
func (*Vector) UnsafeGetRawData ¶ added in v0.8.0
func (*Vector) UnsafeGetStringAt ¶ added in v1.2.1
no copy. it is unsafe if the user cannot determine the vector's life