Documentation
¶
Index ¶
- Variables
- func CompareVectors(expected *vector.Vector, got *vector.Vector) bool
- func NewArrayVector[T types.RealNumbers](n int, typ types.Type, m *mpool.MPool, random bool, vs [][]T) *vector.Vector
- func NewBatch(ts []types.Type, random bool, n int, m *mpool.MPool) *batch.Batch
- func NewBatchWithNulls(ts []types.Type, random bool, n int, m *mpool.MPool) *batch.Batch
- func NewBatchWithVectors(vs []*vector.Vector, zs []int64) *batch.Batch
- func NewBlockidVector(n int, typ types.Type, m *mpool.MPool, _ bool, vs []types.Blockid) *vector.Vector
- func NewBoolVector(n int, typ types.Type, m *mpool.MPool, _ bool, vs []bool) *vector.Vector
- func NewDateVector(n int, typ types.Type, m *mpool.MPool, random bool, vs []string) *vector.Vector
- func NewDatetimeVector(n int, typ types.Type, m *mpool.MPool, random bool, vs []string) *vector.Vector
- func NewDecimal128Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []types.Decimal128) *vector.Vector
- func NewDecimal64Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []types.Decimal64) *vector.Vector
- func NewETLFS() fileservice.FileService
- func NewFS() *fileservice.FileServices
- func NewFloat32Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []float32) *vector.Vector
- func NewFloat64Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []float64) *vector.Vector
- func NewInt16Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []int16) *vector.Vector
- func NewInt32Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []int32) *vector.Vector
- func NewInt64Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []int64) *vector.Vector
- func NewInt8Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []int8) *vector.Vector
- func NewJsonVector(n int, typ types.Type, m *mpool.MPool, _ bool, vs []string) *vector.Vector
- func NewProcess() *process.Process
- func NewProcessWithMPool(mp *mpool.MPool) *process.Process
- func NewRegMsg(bat *batch.Batch) *process.RegisterMessage
- func NewRowidVector(n int, typ types.Type, m *mpool.MPool, _ bool, vs []types.Rowid) *vector.Vector
- func NewSharedFS() fileservice.FileService
- func NewStringVector(n int, typ types.Type, m *mpool.MPool, random bool, vs []string) *vector.Vector
- func NewTimeVector(n int, typ types.Type, m *mpool.MPool, random bool, vs []string) *vector.Vector
- func NewTimestampVector(n int, typ types.Type, m *mpool.MPool, random bool, vs []string) *vector.Vector
- func NewTsVector(n int, typ types.Type, m *mpool.MPool, _ bool, vs []types.TS) *vector.Vector
- func NewUInt16Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []uint16) *vector.Vector
- func NewUInt32Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []uint32) *vector.Vector
- func NewUInt64Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []uint64) *vector.Vector
- func NewUInt8Vector(n int, typ types.Type, m *mpool.MPool, random bool, vs []uint8) *vector.Vector
- func NewVector(n int, typ types.Type, m *mpool.MPool, random bool, Values interface{}) *vector.Vector
- func OperatorCatchBatch(operatorName string, bat *batch.Batch) string
- func SetupAutoIncrService()
- type FunctionTestCase
- type FunctionTestInput
- type FunctionTestResult
Constants ¶
This section is empty.
Variables ¶
var ( TestUtilMp = mpool.MustNewZeroNoFixed() MakeInt64Vector = func(values []int64, nsp []uint64) *vector.Vector { return makeVector(values, nsp, int64Type) } MakeInt32Vector = func(values []int32, nsp []uint64) *vector.Vector { return makeVector(values, nsp, int32Type) } MakeInt16Vector = func(values []int16, nsp []uint64) *vector.Vector { return makeVector(values, nsp, int16Type) } MakeRowIdVector = func(values []types.Rowid, nsp []uint64) *vector.Vector { return makeVector(values, nsp, rowIdType) } MakeInt8Vector = func(values []int8, nsp []uint64) *vector.Vector { return makeVector(values, nsp, int8Type) } MakeUint16Vector = func(values []uint16, nsp []uint64) *vector.Vector { return makeVector(values, nsp, uint16Type) } MakeVarcharVector = func(values []string, nsp []uint64) *vector.Vector { return makeStringVector(values, nsp, varcharType) } MakeTextVector = func(values []string, nsp []uint64) *vector.Vector { return makeStringVector(values, nsp, textType) } )
All vectors generated by the Make Function, their memory is not allocated through the memory pool if you want to generate a vector in memory pool, use NewFunction to instead of MakeFunction.
var ( MakeScalarNull = func(typ types.T, length int) *vector.Vector { return vector.NewConstNull(typ.ToType(), length, NewProc().Mp()) } MakeScalarInt64 = func(v int64, length int) *vector.Vector { return makeScalar(v, length, int64Type) } MakeScalarVarchar = func(value string, length int) *vector.Vector { return makeScalarString(value, length, varcharType) } )
functions to make a scalar vector for test.
var NewProc = NewProcess
Functions ¶
func CompareVectors ¶ added in v0.6.0
func NewArrayVector ¶ added in v1.1.0
func NewBatchWithNulls ¶ added in v0.6.0
func NewBatchWithVectors ¶ added in v0.6.0
func NewBlockidVector ¶ added in v0.8.0
func NewBoolVector ¶
func NewDateVector ¶
func NewDatetimeVector ¶
func NewDecimal128Vector ¶
func NewDecimal64Vector ¶
func NewETLFS ¶ added in v1.1.0
func NewETLFS() fileservice.FileService
func NewFS ¶ added in v0.6.0
func NewFS() *fileservice.FileServices
func NewFloat32Vector ¶
func NewFloat64Vector ¶
func NewInt16Vector ¶
func NewInt32Vector ¶
func NewInt64Vector ¶
func NewInt8Vector ¶
func NewJsonVector ¶ added in v0.6.0
func NewProcess ¶ added in v0.6.0
func NewProcessWithMPool ¶ added in v0.6.0
func NewRowidVector ¶ added in v0.7.0
func NewSharedFS ¶ added in v1.1.0
func NewSharedFS() fileservice.FileService
func NewStringVector ¶
func NewTimeVector ¶ added in v0.6.0
func NewTimestampVector ¶
func NewTsVector ¶ added in v0.7.0
func NewUInt16Vector ¶
func NewUInt32Vector ¶
func NewUInt64Vector ¶
func NewUInt8Vector ¶
func OperatorCatchBatch ¶ added in v0.8.0
OperatorCatchBatch return a string with format
`insert operator catch a batch, batch length is 100, [vec 0 : len is 100]`
func SetupAutoIncrService ¶ added in v0.8.0
func SetupAutoIncrService()
Types ¶
type FunctionTestCase ¶ added in v0.7.0
type FunctionTestCase struct {
// contains filtered or unexported fields
}
func NewFunctionTestCase ¶ added in v0.7.0
func NewFunctionTestCase( proc *process.Process, inputs []FunctionTestInput, wanted FunctionTestResult, fn fEvalFn) FunctionTestCase
NewFunctionTestCase generate a testcase for built-in function F. fn is the evaluate method of F.
func (*FunctionTestCase) BenchMarkRun ¶ added in v0.7.0
func (fc *FunctionTestCase) BenchMarkRun() error
BenchMarkRun will run the function case N times without correctness check for result.
func (*FunctionTestCase) DebugRun ¶ added in v0.7.0
func (fc *FunctionTestCase) DebugRun() (*vector.Vector, error)
DebugRun will not run the compare logic for function result but return the result vector directly.
func (*FunctionTestCase) GetResultVectorDirectly ¶ added in v0.8.0
func (fc *FunctionTestCase) GetResultVectorDirectly() *vector.Vector
func (*FunctionTestCase) Run ¶ added in v0.7.0
func (fc *FunctionTestCase) Run() (succeed bool, errInfo string)
Run will run the function case and do the correctness check for result.
type FunctionTestInput ¶ added in v0.7.0
type FunctionTestInput struct {
// contains filtered or unexported fields
}
FunctionTestInput the values should fit to typ. for example: if typ is int64, the values should be []int64 if your typ is string type (varchar or others), the values should be []string.
func NewFunctionTestConstInput ¶ added in v0.8.0
func NewFunctionTestConstInput(typ types.Type, values any, nullList []bool) FunctionTestInput
func NewFunctionTestInput ¶ added in v0.7.0
func NewFunctionTestInput(typ types.Type, values any, nullList []bool) FunctionTestInput
type FunctionTestResult ¶ added in v0.7.0
type FunctionTestResult struct {
// contains filtered or unexported fields
}
FunctionTestResult the wanted should fit to typ. for example: if typ is int64, the wanted should be []int64 if your typ is string type (varchar or others), the wanted should be []string.