Documentation
¶
Index ¶
- func AppendBytes(v *Vector, arg [][]byte, m *mpool.MPool) error
- func AppendFixed[T any](v *Vector, arg []T, m *mpool.MPool) error
- func AppendFixedRaw(v *Vector, data []byte, m *mpool.MPool) error
- func AppendString(v *Vector, arg []string, m *mpool.MPool) error
- func AppendTuple(v *Vector, arg [][]interface{}) error
- func Clean(v *Vector, m *mpool.MPool)
- func Copy(v, w *Vector, vi, wi int64, m *mpool.MPool) error
- func DecodeFixedCol[T types.FixedSizeT](v *Vector, sz int) []T
- func GetBytesVectorValues(v *Vector) [][]byte
- func GetColumn[T any](v *Vector) []T
- func GetFixedVectorValues[T types.FixedSizeT](v *Vector) []T
- func GetInitConstVal(typ types.Type) any
- func GetPtrAt(v *Vector, idx int64) unsafe.Pointer
- func GetStrColumn(v *Vector) []string
- func GetStrVectorValues(v *Vector) []string
- func GetValueAt[T types.FixedSizeT](v *Vector, idx int64) T
- func GetValueAtOrZero[T types.FixedSizeT](v *Vector, idx int64) T
- func Length(v *Vector) int
- func MustBytesCols(v *Vector) [][]byte
- func MustStrCols(v *Vector) []string
- func MustTCols[T types.FixedSizeT](v *Vector) []T
- func MustVarlenaRawData(v *Vector) (data []types.Varlena, area []byte)
- func PreAlloc(v *Vector, rows, cap int, m *mpool.MPool)
- func ProtoTypeToType(typ *plan.Type) types.Type
- func Reset(v *Vector)
- func SetBytesAt(v *Vector, idx int, bs []byte, m *mpool.MPool) error
- func SetCol(v *Vector, col interface{})
- func SetLength(v *Vector, n int)
- func SetStringAt(v *Vector, idx int, bs string, m *mpool.MPool) error
- func SetTAt[T types.FixedSizeT](v *Vector, idx int, t T) error
- func SetVectorLength(v *Vector, n int)
- func Shrink(v *Vector, sels []int64)
- func ShrinkFixed[T types.FixedSizeT](v *Vector, sels []int64)
- func Shuffle(v *Vector, sels []int64, m *mpool.MPool) error
- func ShuffleFixed[T types.FixedSizeT](v *Vector, sels []int64, m *mpool.MPool) error
- func TypeToProtoType(typ types.Type) *plan.Type
- func Union(v, w *Vector, sels []int64, hasNull bool, m *mpool.MPool) (err error)
- func UnionBatch(v, w *Vector, offset int64, cnt int, flags []uint8, m *mpool.MPool) (err error)
- func UnionMulti(v, w *Vector, sel int64, cnt int, m *mpool.MPool) (err error)
- func UnionNull(v, _ *Vector, m *mpool.MPool) error
- func UnionOne(v, w *Vector, sel int64, m *mpool.MPool) (err error)
- func VecToString[T types.FixedSizeT](v *Vector) string
- func VectorToProtoVector(vec *Vector) (*api.Vector, error)
- type Vector
- func BuildVarlenaVector(typ types.Type, data []types.Varlena, area []byte) (vec *Vector, err error)
- func CheckInsertVector(v *Vector, m *mpool.MPool) *Vector
- func Dup(v *Vector, m *mpool.MPool) (*Vector, error)
- func New(typ types.Type) *Vector
- func NewConst(typ types.Type, length int) *Vector
- func NewConstBytes(typ types.Type, length int, val []byte, mp *mpool.MPool) *Vector
- func NewConstFixed[T types.FixedSizeT](typ types.Type, length int, val T, mp *mpool.MPool) *Vector
- func NewConstNull(typ types.Type, length int) *Vector
- func NewConstNullWithData(typ types.Type, length int, mp *mpool.MPool) *Vector
- func NewConstString(typ types.Type, length int, val string, mp *mpool.MPool) *Vector
- func NewOriginal(typ types.Type) *Vector
- func NewOriginalWithData(typ types.Type, data []byte, nsp *nulls.Nulls) *Vector
- func NewWithBytes(typ types.Type, vals [][]byte, nsp *nulls.Nulls, m *mpool.MPool) *Vector
- func NewWithFixed[T any](typ types.Type, vals []T, nsp *nulls.Nulls, m *mpool.MPool) *Vector
- func NewWithNspSize(typ types.Type, n int64) *Vector
- func NewWithStrings(typ types.Type, vals []string, nsp *nulls.Nulls, m *mpool.MPool) *Vector
- func PreAllocType(t types.Type, rows, cap int, m *mpool.MPool) *Vector
- func ProtoVectorToVector(vec *api.Vector) (*Vector, error)
- func Window(v *Vector, start, end int, w *Vector) *Vector
- func (v *Vector) Append(w any, isNull bool, m *mpool.MPool) error
- func (v *Vector) CompareAndCheckAnyResultIsTrue(vec *Vector, funName string) (bool, error)
- func (v *Vector) CompareAndCheckIntersect(vec *Vector) (bool, error)
- func (v *Vector) ConstExpand(m *mpool.MPool) *Vector
- func (v *Vector) ConstVectorIsNull() bool
- func (v *Vector) FillDefaultValue()
- func (v *Vector) Free(m *mpool.MPool)
- func (v *Vector) FreeOriginal(m *mpool.MPool)
- func (v *Vector) GetArea() []byte
- func (v *Vector) GetBytes(i int64) []byte
- func (v *Vector) GetIsBin() bool
- func (v *Vector) GetNulls() *nulls.Nulls
- func (v *Vector) GetString(i int64) string
- func (v *Vector) GetType() types.Type
- func (v *Vector) Index() any
- func (v *Vector) IsConst() bool
- func (v *Vector) IsLowCardinality() bool
- func (v *Vector) IsOriginal() bool
- func (v *Vector) IsScalar() bool
- func (v *Vector) IsScalarNull() bool
- func (v *Vector) Length() int
- func (v *Vector) MakeScalar(length int)
- func (v *Vector) MarshalBinary() ([]byte, error)
- func (v *Vector) Read(data []byte) error
- func (v *Vector) ScalarLength() int
- func (v *Vector) SetIndex(idx any)
- func (v *Vector) SetIsBin(isBin bool)
- func (v *Vector) SetOriginal(status bool)
- func (v *Vector) SetScalarLength(length int)
- func (v *Vector) Show() ([]byte, error)
- func (v *Vector) Size() int
- func (v *Vector) String() string
- func (v *Vector) ToConst(row int, mp *mpool.MPool) *Vector
- func (v *Vector) TryExpandNulls(n int)
- func (v *Vector) UnmarshalBinary(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFixed ¶ added in v0.6.0
func AppendFixedRaw ¶ added in v0.6.0
func AppendString ¶ added in v0.6.0
func AppendTuple ¶ added in v0.6.0
func DecodeFixedCol ¶
func DecodeFixedCol[T types.FixedSizeT](v *Vector, sz int) []T
func GetBytesVectorValues ¶ added in v0.6.0
func GetColumn ¶ added in v0.5.1
XXX A huge hammer, get rid of any typing and totally depends on v.Col We should really not using this one but it is wide spread already.
func GetFixedVectorValues ¶ added in v0.5.0
func GetFixedVectorValues[T types.FixedSizeT](v *Vector) []T
GetFixedVector decode data and return decoded []T. For const/scalar vector we expand and return newly allocated slice.
func GetInitConstVal ¶ added in v0.6.0
func GetStrColumn ¶ added in v0.6.0
XXX Compatibility: how many aliases do we need ...
func GetStrVectorValues ¶ added in v0.5.0
func GetValueAt ¶ added in v0.6.0
func GetValueAt[T types.FixedSizeT](v *Vector, idx int64) T
Get Value at index
func GetValueAtOrZero ¶ added in v0.6.0
func GetValueAtOrZero[T types.FixedSizeT](v *Vector, idx int64) T
func MustBytesCols ¶ added in v0.5.0
func MustStrCols ¶ added in v0.6.0
func MustTCols ¶ added in v0.5.0
func MustTCols[T types.FixedSizeT](v *Vector) []T
func MustVarlenaRawData ¶ added in v0.6.0
func Reset ¶
func Reset(v *Vector)
XXX Old Reset is FUBAR FUBAR. I will put the code here just for fun.
func SetBytesAt ¶ added in v0.6.0
func SetStringAt ¶ added in v0.6.0
func SetVectorLength ¶ added in v0.5.0
func ShrinkFixed ¶ added in v0.6.0
func ShrinkFixed[T types.FixedSizeT](v *Vector, sels []int64)
func ShuffleFixed ¶ added in v0.6.0
Shuffle assumes we do not have dup in sels.
func UnionBatch ¶
XXX Old UnionBatch is FUBAR.
func UnionMulti ¶ added in v0.6.0
func UnionNull ¶ added in v0.5.0
XXX Old UnionNull is FUBAR func UnionNull(v, _ *Vector, m *mpool.MPool) error It seems to do UnionOne(v, v, 0, m), only that if v is empty, append a zero value instead of v[0]. I don't know why this is called UnionNull -- it does not have much to do with Null.
XXX Original code alloc or grow typesize * 8 bytes. It is not clear people want to amortize alloc/grow, or it is a bug.
func UnionOne ¶
XXX Old UnionOne is FUBAR It is simply append. We do not go through appendOne interface because we don't want to horrible type switch.
func VecToString ¶ added in v0.6.0
func VecToString[T types.FixedSizeT](v *Vector) string
XXX What are these stuff, who use it?
Types ¶
type Vector ¶
type Vector struct { // XXX There was Ref and Link, from the impl, it is totally wrong stuff. // Removed. Typ types.Type Col interface{} // column data, encoded Data Nsp *nulls.Nulls // nulls list // contains filtered or unexported fields }
XXX Moved vector from types.go to vector.go XXX Deleted vector interface, which was commented out and outdated anyway.
Vector vector * origin true: * count || type || bitmap size || bitmap || vector * origin false: * count || vector
func BuildVarlenaVector ¶ added in v0.6.0
func CheckInsertVector ¶ added in v0.6.0
CheckInsertVector vector.data will not be nil when insert rows
func NewConstBytes ¶ added in v0.6.0
func NewConstFixed ¶ added in v0.6.0
func NewConstNullWithData ¶ added in v0.6.0
func NewConstString ¶ added in v0.6.0
func NewOriginal ¶ added in v0.6.0
func NewOriginalWithData ¶ added in v0.6.0
func NewWithBytes ¶ added in v0.6.0
func NewWithFixed ¶ added in v0.6.0
func NewWithStrings ¶ added in v0.6.0
func PreAllocType ¶ added in v0.6.0
func ProtoVectorToVector ¶ added in v0.6.0
func (*Vector) CompareAndCheckAnyResultIsTrue ¶ added in v0.6.0
CompareAndCheckAnyResultIsTrue we use this method for eval expr by zonemap funName must be ">,<,>=,<="
func (*Vector) CompareAndCheckIntersect ¶ added in v0.6.0
CompareAndCheckIntersect we use this method for eval expr by zonemap
func (*Vector) ConstVectorIsNull ¶ added in v0.5.0
XXX aliases ...
func (*Vector) FillDefaultValue ¶ added in v0.5.0
func (v *Vector) FillDefaultValue()
func (*Vector) FreeOriginal ¶ added in v0.6.0
func (*Vector) IsLowCardinality ¶ added in v0.6.0
func (*Vector) IsOriginal ¶ added in v0.6.0
func (*Vector) IsScalar ¶ added in v0.5.0
IsScalar return true if the vector means a scalar value. e.g.
a + 1, and 1's vector will return true
func (*Vector) IsScalarNull ¶ added in v0.5.0
IsScalarNull return true if the vector means a scalar Null. e.g.
a + Null, and the vector of right part will return true
func (*Vector) MakeScalar ¶ added in v0.6.0
MakeScalar converts a vector to a scalar vec of length.
func (*Vector) MarshalBinary ¶ added in v0.6.0
func (*Vector) ScalarLength ¶ added in v0.6.0
func (*Vector) SetOriginal ¶ added in v0.6.0
func (*Vector) SetScalarLength ¶ added in v0.6.0
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.