record

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	TimeField           = "time"
	RecMaxLenForRuse    = 512
	RecMaxRowNumForRuse = 2024
)
View Source
const (
	BooleanSizeBytes = int(unsafe.Sizeof(false))
	Uint32SizeBytes  = int(unsafe.Sizeof(uint32(0)))
	Uint16SizeBytes  = int(unsafe.Sizeof(uint16(0)))
	Uint64SizeBytes  = int(unsafe.Sizeof(uint64(0)))
	Int16SizeBytes   = int(unsafe.Sizeof(int16(0)))
	Int32SizeBytes   = int(unsafe.Sizeof(int32(0)))
	Int64SizeBytes   = int(unsafe.Sizeof(int64(0)))
	Float32SizeBytes = int(unsafe.Sizeof(float32(0)))
	Float64SizeBytes = int(unsafe.Sizeof(float64(0)))
	Int8SizeBytes    = int(unsafe.Sizeof(int8(0)))
)

Variables

View Source
var (
	BitMask        = [8]byte{1, 2, 4, 8, 16, 32, 64, 128}
	FlippedBitMask = [8]byte{254, 253, 251, 247, 239, 223, 191, 127}
)
View Source
var MinMaxTimeRange = TimeRange{Min: influxql.MinTime, Max: influxql.MaxTime}

Functions

func BooleanSlice2byte

func BooleanSlice2byte(b []bool) []byte

func Bytes2BooleanSlice

func Bytes2BooleanSlice(b []byte) []bool

func Bytes2Float32Slice

func Bytes2Float32Slice(b []byte) []float32

func Bytes2Float64Slice

func Bytes2Float64Slice(b []byte) []float64

func Bytes2Int16Slice

func Bytes2Int16Slice(b []byte) []int16

func Bytes2Int32Slice

func Bytes2Int32Slice(b []byte) []int32

func Bytes2Int64Slice

func Bytes2Int64Slice(b []byte) []int64

func Bytes2Int64SliceBigEndian added in v1.0.0

func Bytes2Int64SliceBigEndian(b []byte) []int64

func Bytes2Int8Slice

func Bytes2Int8Slice(b []byte) []int8

func Bytes2Uint16Slice

func Bytes2Uint16Slice(b []byte) []uint16

func Bytes2Uint32Slice

func Bytes2Uint32Slice(b []byte) []uint32

func Bytes2Uint32SliceBigEndian added in v1.0.0

func Bytes2Uint32SliceBigEndian(b []byte) []uint32

func Bytes2Uint64Slice

func Bytes2Uint64Slice(b []byte) []uint64

func Bytes2Uint64SliceBigEndian added in v1.0.0

func Bytes2Uint64SliceBigEndian(b []byte) []uint64

func Bytes2str

func Bytes2str(b []byte) string

func CheckCol added in v1.0.0

func CheckCol(col *ColVal)

func CheckRecord

func CheckRecord(rec *Record)

func Float32Slice2byte

func Float32Slice2byte(b []float32) []byte

func Float64Slice2byte

func Float64Slice2byte(b []float64) []byte

func Float64ToUint64

func Float64ToUint64(v float64) uint64

func GetTimeRangeEndIndex

func GetTimeRangeEndIndex(times []int64, startPos int, endTime int64) int

GetTimeRangeEndIndex return last time index in times <= endTime

func GetTimeRangeEndIndexDescend

func GetTimeRangeEndIndexDescend(times []int64, startPos int, endTime int64) int

func GetTimeRangeStartIndex

func GetTimeRangeStartIndex(times []int64, startPos int, startTime int64) int

GetTimeRangeStartIndex return first time index in times >= startTime

func GetTimeRangeStartIndexDescend

func GetTimeRangeStartIndexDescend(times []int64, startPos int, startTime int64) int

func Int16Slice2byte

func Int16Slice2byte(b []int16) []byte

func Int32Slice2byte

func Int32Slice2byte(b []int32) []byte

func Int64Slice2ByteBigEndian added in v1.0.0

func Int64Slice2ByteBigEndian(b []int64) []byte

func Int64Slice2byte

func Int64Slice2byte(b []int64) []byte

func Max

func Max(x, y int) int

func MemorySet

func MemorySet(buf []byte)

func Min

func Min(x, y int) int

func RemoveDuplicationInt

func RemoveDuplicationInt(array []uint32) []uint32

func ReverseBitMap

func ReverseBitMap(bitmap []byte, bitmapOffset uint32, count int) []byte

func Str2bytes

func Str2bytes(s string) []byte

func ToInfluxqlTypes

func ToInfluxqlTypes(ty int) influxql.DataType

func ToModelTypes

func ToModelTypes(ty influxql.DataType) int

func Uint16Slice2byte

func Uint16Slice2byte(b []uint16) []byte

func Uint32Slice2ByteBigEndian added in v1.0.0

func Uint32Slice2ByteBigEndian(b []uint32) []byte

func Uint32Slice2byte

func Uint32Slice2byte(b []uint32) []byte

func Uint64Slice2ByteBigEndian added in v1.0.0

func Uint64Slice2ByteBigEndian(b []uint64) []byte

func Uint64Slice2byte

func Uint64Slice2byte(b []uint64) []byte

func Uint64ToBytes

func Uint64ToBytes(u uint64) []byte

func Uint64ToBytesUnsafe added in v1.0.0

func Uint64ToBytesUnsafe(id uint64) []byte

func Uint64ToFloat64

func Uint64ToFloat64(v uint64) float64

func UpdateBooleanColumnFirst added in v1.0.0

func UpdateBooleanColumnFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnFirstFast added in v1.0.0

func UpdateBooleanColumnFirstFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnLast added in v1.0.0

func UpdateBooleanColumnLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnLastFast added in v1.0.0

func UpdateBooleanColumnLastFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnMax added in v1.0.0

func UpdateBooleanColumnMax(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnMaxFast added in v1.0.0

func UpdateBooleanColumnMaxFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnMin added in v1.0.0

func UpdateBooleanColumnMin(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanColumnMinFast added in v1.0.0

func UpdateBooleanColumnMinFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanFirst added in v1.0.0

func UpdateBooleanFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanFirstFast added in v1.0.0

func UpdateBooleanFirstFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanLast added in v1.0.0

func UpdateBooleanLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanLastFast added in v1.0.0

func UpdateBooleanLastFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanMax added in v1.0.0

func UpdateBooleanMax(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanMaxFast added in v1.0.0

func UpdateBooleanMaxFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanMin added in v1.0.0

func UpdateBooleanMin(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateBooleanMinFast added in v1.0.0

func UpdateBooleanMinFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateCount added in v1.0.0

func UpdateCount(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateCountFast added in v1.0.0

func UpdateCountFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnFirst added in v1.0.0

func UpdateFloatColumnFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnFirstFast added in v1.0.0

func UpdateFloatColumnFirstFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnLast added in v1.0.0

func UpdateFloatColumnLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnLastFast added in v1.0.0

func UpdateFloatColumnLastFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnMax added in v1.0.0

func UpdateFloatColumnMax(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnMaxFast added in v1.0.0

func UpdateFloatColumnMaxFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnMin added in v1.0.0

func UpdateFloatColumnMin(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatColumnMinFast added in v1.0.0

func UpdateFloatColumnMinFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatFirst added in v1.0.0

func UpdateFloatFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatFirstFast added in v1.0.0

func UpdateFloatFirstFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatLast added in v1.0.0

func UpdateFloatLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatLastFast added in v1.0.0

func UpdateFloatLastFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatMax added in v1.0.0

func UpdateFloatMax(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatMaxFast added in v1.0.0

func UpdateFloatMaxFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatMin added in v1.0.0

func UpdateFloatMin(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatMinFast added in v1.0.0

func UpdateFloatMinFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatSum added in v1.0.0

func UpdateFloatSum(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateFloatSumFast added in v1.0.0

func UpdateFloatSumFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnFirst added in v1.0.0

func UpdateIntegerColumnFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnFirstFast added in v1.0.0

func UpdateIntegerColumnFirstFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnLast added in v1.0.0

func UpdateIntegerColumnLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnLastFast added in v1.0.0

func UpdateIntegerColumnLastFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnMax added in v1.0.0

func UpdateIntegerColumnMax(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnMaxFast added in v1.0.0

func UpdateIntegerColumnMaxFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnMin added in v1.0.0

func UpdateIntegerColumnMin(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerColumnMinFast added in v1.0.0

func UpdateIntegerColumnMinFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerFirst added in v1.0.0

func UpdateIntegerFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerFirstFast added in v1.0.0

func UpdateIntegerFirstFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerLast added in v1.0.0

func UpdateIntegerLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerLastFast added in v1.0.0

func UpdateIntegerLastFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerMax added in v1.0.0

func UpdateIntegerMax(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerMaxFast added in v1.0.0

func UpdateIntegerMaxFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerMin added in v1.0.0

func UpdateIntegerMin(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerMinFast added in v1.0.0

func UpdateIntegerMinFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerSum added in v1.0.0

func UpdateIntegerSum(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateIntegerSumFast added in v1.0.0

func UpdateIntegerSumFast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateStringColumnFirst added in v1.0.0

func UpdateStringColumnFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateStringColumnLast added in v1.0.0

func UpdateStringColumnLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateStringFirst added in v1.0.0

func UpdateStringFirst(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

func UpdateStringLast added in v1.0.0

func UpdateStringLast(iRec, rec *Record, recColumn, iRecColumn, recRow, iRecRow int)

Types

type CircularRecordPool

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

func NewCircularRecordPool

func NewCircularRecordPool(recordPool *RecordPool, recordNum int, schema Schemas, initColMeta bool) *CircularRecordPool

func (*CircularRecordPool) Get

func (p *CircularRecordPool) Get() *Record

func (*CircularRecordPool) GetBySchema

func (p *CircularRecordPool) GetBySchema(s Schemas) *Record

func (*CircularRecordPool) GetIndex

func (p *CircularRecordPool) GetIndex() int

func (*CircularRecordPool) Put

func (p *CircularRecordPool) Put()

func (*CircularRecordPool) PutRecordInCircularPool

func (p *CircularRecordPool) PutRecordInCircularPool()

type ColMergePerformer added in v1.0.0

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

func (*ColMergePerformer) MergeOrder added in v1.0.0

func (p *ColMergePerformer) MergeOrder()

func (*ColMergePerformer) MergeSameTime added in v1.0.0

func (p *ColMergePerformer) MergeSameTime()

func (*ColMergePerformer) MergeUnordered added in v1.0.0

func (p *ColMergePerformer) MergeUnordered()

func (*ColMergePerformer) Times added in v1.0.0

func (p *ColMergePerformer) Times(order bool) *Times

type ColMeta

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

func (*ColMeta) Clone

func (m *ColMeta) Clone() (ColMeta, error)

func (*ColMeta) Count

func (m *ColMeta) Count() interface{}

func (*ColMeta) First

func (m *ColMeta) First() (interface{}, int64)

func (*ColMeta) Init

func (m *ColMeta) Init()

func (*ColMeta) IsEmpty

func (m *ColMeta) IsEmpty() bool

func (*ColMeta) Last

func (m *ColMeta) Last() (interface{}, int64)

func (*ColMeta) Max

func (m *ColMeta) Max() (interface{}, int64)

func (*ColMeta) Min

func (m *ColMeta) Min() (interface{}, int64)

func (*ColMeta) SetCount

func (m *ColMeta) SetCount(count interface{})

func (*ColMeta) SetFirst

func (m *ColMeta) SetFirst(first interface{}, firstTime int64)

func (*ColMeta) SetLast

func (m *ColMeta) SetLast(last interface{}, lastTime int64)

func (*ColMeta) SetMax

func (m *ColMeta) SetMax(max interface{}, maxTime int64)

func (*ColMeta) SetMin

func (m *ColMeta) SetMin(min interface{}, minTime int64)

func (*ColMeta) SetSum

func (m *ColMeta) SetSum(sum interface{})

func (*ColMeta) Sum

func (m *ColMeta) Sum() interface{}

type ColVal

type ColVal struct {
	Val          []byte
	Offset       []uint32
	Bitmap       []byte
	BitMapOffset int
	Len          int
	NilCount     int
}

func (*ColVal) Append

func (cv *ColVal) Append(value []byte, offsets []uint32, bitMap []byte, bitOffset int, vLen int, nilCount int, colType, start, end int)

func (*ColVal) AppendAll

func (cv *ColVal) AppendAll(src *ColVal)

func (*ColVal) AppendBitmap

func (cv *ColVal) AppendBitmap(bitmap []byte, bitOffset int, rows int, start, end int)

func (*ColVal) AppendBoolean

func (cv *ColVal) AppendBoolean(v bool)

func (*ColVal) AppendBooleanNull

func (cv *ColVal) AppendBooleanNull()

func (*ColVal) AppendBooleanNullReserve added in v1.0.0

func (cv *ColVal) AppendBooleanNullReserve()

func (*ColVal) AppendBooleanNulls

func (cv *ColVal) AppendBooleanNulls(count int)

func (*ColVal) AppendBooleans

func (cv *ColVal) AppendBooleans(values ...bool)

func (*ColVal) AppendColVal

func (cv *ColVal) AppendColVal(srcCol *ColVal, colType, start, end int)

func (*ColVal) AppendFloat

func (cv *ColVal) AppendFloat(v float64)

func (*ColVal) AppendFloatNull

func (cv *ColVal) AppendFloatNull()

func (*ColVal) AppendFloatNullReserve added in v1.0.0

func (cv *ColVal) AppendFloatNullReserve()

func (*ColVal) AppendFloatNulls

func (cv *ColVal) AppendFloatNulls(count int)

func (*ColVal) AppendFloats

func (cv *ColVal) AppendFloats(values ...float64)

func (*ColVal) AppendInteger

func (cv *ColVal) AppendInteger(v int64)

func (*ColVal) AppendIntegerNull

func (cv *ColVal) AppendIntegerNull()

func (*ColVal) AppendIntegerNullReserve added in v1.0.0

func (cv *ColVal) AppendIntegerNullReserve()

func (*ColVal) AppendIntegerNulls

func (cv *ColVal) AppendIntegerNulls(count int)

func (*ColVal) AppendIntegers

func (cv *ColVal) AppendIntegers(values ...int64)

func (*ColVal) AppendString

func (cv *ColVal) AppendString(v string)

func (*ColVal) AppendStringNull

func (cv *ColVal) AppendStringNull()

func (*ColVal) AppendStringNulls

func (cv *ColVal) AppendStringNulls(count int)

func (*ColVal) AppendStrings

func (cv *ColVal) AppendStrings(values ...string)

func (*ColVal) AppendTimes added in v1.0.0

func (cv *ColVal) AppendTimes(times []int64)

func (*ColVal) AppendWithNilCount added in v1.0.0

func (cv *ColVal) AppendWithNilCount(src *ColVal, colType, start, end int, nc *NilCount)

AppendWithNilCount modified from method "ColVal.Append" Compared with method "ColVal.Append", the number of nulls is calculated in advance.

func (*ColVal) BooleanValue

func (cv *ColVal) BooleanValue(i int) (bool, bool)

func (*ColVal) BooleanValueWithNullReserve added in v1.0.0

func (cv *ColVal) BooleanValueWithNullReserve(index int) (bool, bool)

func (*ColVal) BooleanValues

func (cv *ColVal) BooleanValues() []bool

func (*ColVal) FillBitmap added in v1.0.0

func (cv *ColVal) FillBitmap(val uint8)

func (*ColVal) FirstBooleanValue

func (cv *ColVal) FirstBooleanValue(values []bool, start, end int) (bool, int)

func (*ColVal) FirstFloatValue

func (cv *ColVal) FirstFloatValue(values []float64, start, end int) (float64, int)

func (*ColVal) FirstIntegerValue

func (cv *ColVal) FirstIntegerValue(values []int64, start, end int) (int64, int)

func (*ColVal) FirstStringValue

func (cv *ColVal) FirstStringValue(values []string, start, end int) (string, int)

func (*ColVal) FloatValue

func (cv *ColVal) FloatValue(i int) (float64, bool)

func (*ColVal) FloatValueWithNullReserve added in v1.0.0

func (cv *ColVal) FloatValueWithNullReserve(index int) (float64, bool)

func (*ColVal) FloatValues

func (cv *ColVal) FloatValues() []float64

func (*ColVal) GetValIndexRange

func (cv *ColVal) GetValIndexRange(bmStart, bmEnd int) (valStart, valEnd int)

func (*ColVal) Init

func (cv *ColVal) Init()

func (*ColVal) Int8Values

func (cv *ColVal) Int8Values() []int8

func (*ColVal) IntegerValue

func (cv *ColVal) IntegerValue(i int) (int64, bool)

func (*ColVal) IntegerValueWithNullReserve added in v1.0.0

func (cv *ColVal) IntegerValueWithNullReserve(index int) (int64, bool)

func (*ColVal) IntegerValues

func (cv *ColVal) IntegerValues() []int64

func (*ColVal) IsNil

func (cv *ColVal) IsNil(i int) bool

func (*ColVal) LastBooleanValue

func (cv *ColVal) LastBooleanValue(values []bool, start, end int) (bool, int)

func (*ColVal) LastFloatValue

func (cv *ColVal) LastFloatValue(values []float64, start, end int) (float64, int)

func (*ColVal) LastIntegerValue

func (cv *ColVal) LastIntegerValue(values []int64, start, end int) (int64, int)

func (*ColVal) LastStringValue

func (cv *ColVal) LastStringValue(values []string, start, end int) (string, int)

func (*ColVal) Length

func (cv *ColVal) Length() int

func (*ColVal) MaxBooleanValue

func (cv *ColVal) MaxBooleanValue(values []bool, start, end int) (bool, int)

func (*ColVal) MaxBooleanValues

func (cv *ColVal) MaxBooleanValues(values []bool, start, end int) (bool, []int)

func (*ColVal) MaxFloatValue

func (cv *ColVal) MaxFloatValue(values []float64, start, end int) (float64, int)

func (*ColVal) MaxFloatValues

func (cv *ColVal) MaxFloatValues(values []float64, start, end int) (float64, []int)

func (*ColVal) MaxIntegerValue

func (cv *ColVal) MaxIntegerValue(values []int64, start, end int) (int64, int)

func (*ColVal) MaxIntegerValues

func (cv *ColVal) MaxIntegerValues(values []int64, start, end int) (int64, []int)

func (*ColVal) MinBooleanValue

func (cv *ColVal) MinBooleanValue(values []bool, start, end int) (bool, int)

func (*ColVal) MinBooleanValues

func (cv *ColVal) MinBooleanValues(values []bool, start, end int) (bool, []int)

func (*ColVal) MinFloatValue

func (cv *ColVal) MinFloatValue(values []float64, start, end int) (float64, int)

func (*ColVal) MinFloatValues

func (cv *ColVal) MinFloatValues(values []float64, start, end int) (float64, []int)

func (*ColVal) MinIntegerValue

func (cv *ColVal) MinIntegerValue(values []int64, start, end int) (int64, int)

func (*ColVal) MinIntegerValues

func (cv *ColVal) MinIntegerValues(values []int64, start, end int) (int64, []int)

func (*ColVal) NullN

func (cv *ColVal) NullN() int

func (*ColVal) PadColVal

func (cv *ColVal) PadColVal(colType, padLen int)

func (*ColVal) ReserveBitmap

func (cv *ColVal) ReserveBitmap(bytes int)

func (*ColVal) RowBitmap

func (cv *ColVal) RowBitmap(dst []bool) []bool

func (*ColVal) SliceBitMap

func (cv *ColVal) SliceBitMap(srcCol *ColVal, start, end int)

func (*ColVal) Split

func (cv *ColVal) Split(dst []ColVal, maxRows int, refType int) []ColVal

func (*ColVal) SplitByIndex added in v1.0.0

func (cv *ColVal) SplitByIndex(dst []ColVal, index int, refType int) []ColVal

func (*ColVal) StringValueSafe

func (cv *ColVal) StringValueSafe(i int) (string, bool)

func (*ColVal) StringValueUnsafe

func (cv *ColVal) StringValueUnsafe(i int) (string, bool)

func (*ColVal) StringValues

func (cv *ColVal) StringValues(dst []string) []string

func (*ColVal) SubBitmapBytes

func (cv *ColVal) SubBitmapBytes() ([]byte, int)

func (*ColVal) SubBooleanValues

func (cv *ColVal) SubBooleanValues(start, end int) []bool

func (*ColVal) SubFloatValues

func (cv *ColVal) SubFloatValues(start, end int) []float64

func (*ColVal) SubIntegerValues

func (cv *ColVal) SubIntegerValues(start, end int) []int64

func (*ColVal) UpdateBooleanIntoNull added in v1.0.0

func (cv *ColVal) UpdateBooleanIntoNull(row int)

func (*ColVal) UpdateBooleanValue added in v1.0.0

func (cv *ColVal) UpdateBooleanValue(v bool, isNil bool, row int)

func (*ColVal) UpdateFloatIntoNull added in v1.0.0

func (cv *ColVal) UpdateFloatIntoNull(row int)

func (*ColVal) UpdateFloatValue added in v1.0.0

func (cv *ColVal) UpdateFloatValue(v float64, isNil bool, row int)

func (*ColVal) UpdateIntegerIntoNull added in v1.0.0

func (cv *ColVal) UpdateIntegerIntoNull(row int)

func (*ColVal) UpdateIntegerValue added in v1.0.0

func (cv *ColVal) UpdateIntegerValue(v int64, isNil bool, row int)

func (*ColVal) UpdateStringIntoNull added in v1.0.0

func (cv *ColVal) UpdateStringIntoNull(row int)

func (*ColVal) UpdateStringValue added in v1.0.0

func (cv *ColVal) UpdateStringValue(v string, isNil bool, row int)

func (*ColVal) ValidAt

func (cv *ColVal) ValidAt(i int) bool

func (*ColVal) ValidCount

func (cv *ColVal) ValidCount(start, end int) int

func (*ColVal) ValidString

func (cv *ColVal) ValidString() bool

type Field

type Field struct {
	Type int
	Name string
}

func (*Field) IsString added in v1.0.0

func (f *Field) IsString() bool

func (*Field) String

func (f *Field) String() string

type MergeColVal added in v1.0.0

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

func NewMergeColVal added in v1.0.0

func NewMergeColVal(col *ColVal, typ int) *MergeColVal

func (*MergeColVal) AppendSequence added in v1.0.0

func (mcv *MergeColVal) AppendSequence(src *MergeColVal, limit int)

func (*MergeColVal) IsNil added in v1.0.0

func (mcv *MergeColVal) IsNil() bool

func (*MergeColVal) Skip added in v1.0.0

func (mcv *MergeColVal) Skip(limit int)

type MergeHelper added in v1.0.0

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

func NewMergeHelper added in v1.0.0

func NewMergeHelper() *MergeHelper

func (*MergeHelper) AddUnorderedCol added in v1.0.0

func (h *MergeHelper) AddUnorderedCol(col *ColVal, times []int64, typ int)

func (*MergeHelper) Merge added in v1.0.0

func (h *MergeHelper) Merge(col *ColVal, times []int64, typ int) (*ColVal, []int64, error)

type MergePerformer added in v1.0.0

type MergePerformer interface {
	MergeOrder()
	MergeUnordered()
	MergeSameTime()
	Times(bool) *Times
}

type NilCount added in v1.0.0

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

type RecMeta

type RecMeta struct {
	IntervalIndex []int
	// Times used to store the time for
	// first/last aggregation
	Times [][]int64

	ColMeta []ColMeta // used for pre agg
	// contains filtered or unexported fields
}

func (*RecMeta) AssignRecMetaTimes

func (r *RecMeta) AssignRecMetaTimes(t [][]int64)

func (*RecMeta) Copy

func (r *RecMeta) Copy() *RecMeta

func (*RecMeta) IsEmpty

func (r *RecMeta) IsEmpty() bool

func (*RecMeta) ResetDeep added in v1.0.0

func (r *RecMeta) ResetDeep()

func (*RecMeta) ResetForReuse added in v1.0.0

func (r *RecMeta) ResetForReuse()

type Record

type Record struct {
	*RecMeta
	ColVals []ColVal
	Schema  Schemas
}

func NewRecord

func NewRecord(schema Schemas, initColMeta bool) *Record

func NewRecordBuilder

func NewRecordBuilder(schema []Field) *Record

func (*Record) AddTagIndexAndKey

func (rec *Record) AddTagIndexAndKey(key *[]byte, i int)

func (*Record) AppendIntervalEmptyRow added in v1.0.0

func (rec *Record) AppendIntervalEmptyRow(rowTime int64, initRecMeta bool)

func (*Record) AppendIntervalEmptyRows added in v1.0.0

func (rec *Record) AppendIntervalEmptyRows(start, step, num int64, initRecMeta bool)

func (*Record) AppendRec

func (rec *Record) AppendRec(srcRec *Record, start, end int)

func (*Record) AppendRecForSeries

func (rec *Record) AppendRecForSeries(srcRec *Record, start, end int, ridIdx map[int]struct{})

func (*Record) AppendRecForTagSet

func (rec *Record) AppendRecForTagSet(srcRec *Record, start, end int)

func (*Record) AppendRecRow2IntervalRec added in v1.0.0

func (rec *Record) AppendRecRow2IntervalRec(re *Record, row int)

func (*Record) AppendTime

func (rec *Record) AppendTime(time ...int64)

func (*Record) BuildEmptyIntervalRec added in v1.0.0

func (rec *Record) BuildEmptyIntervalRec(min, max, interval int64, initRecMeta, hasInterval, ascending bool)

func (*Record) Clone

func (rec *Record) Clone() *Record

func (*Record) ColNums

func (rec *Record) ColNums() int

func (*Record) Column

func (rec *Record) Column(i int) *ColVal

func (*Record) ColumnAppendNull

func (rec *Record) ColumnAppendNull(colIdx int)

func (*Record) Columns

func (rec *Record) Columns() []ColVal

func (*Record) Copy

func (rec *Record) Copy() *Record

func (*Record) CopyColMetaTo

func (rec *Record) CopyColMetaTo(dst *Record)

func (*Record) CopyColVals

func (rec *Record) CopyColVals() []ColVal

func (*Record) CopyImpl added in v1.0.0

func (rec *Record) CopyImpl(srcRec *Record, setSchema, reserveColVal bool)

func (*Record) CopyWithCondition

func (rec *Record) CopyWithCondition(ascending bool, tr TimeRange, schema Schemas) *Record

func (*Record) FieldIndexs

func (rec *Record) FieldIndexs(colName string) int

func (*Record) GetTagIndexAndKey

func (rec *Record) GetTagIndexAndKey() ([]*[]byte, []int)

func (*Record) InitColVal

func (rec *Record) InitColVal(start, end int)

func (*Record) IntervalFirstTime added in v1.0.0

func (rec *Record) IntervalFirstTime() int64

func (*Record) IntervalLastTime added in v1.0.0

func (rec *Record) IntervalLastTime() int64

func (*Record) IsIntervalRecRowNull added in v1.0.0

func (rec *Record) IsIntervalRecRowNull(row int) bool

func (*Record) IsNilRow

func (rec *Record) IsNilRow(row int) bool

func (*Record) KickNilRow

func (rec *Record) KickNilRow() *Record

func (Record) Len

func (rec Record) Len() int

func (Record) Less

func (rec Record) Less(i, j int) bool

func (*Record) MaxTime

func (rec *Record) MaxTime(isAscending bool) int64

func (*Record) Merge

func (rec *Record) Merge(newRec *Record)

Merge only for level compaction use

func (*Record) MergeRecord

func (rec *Record) MergeRecord(newRec, oldRec *Record)

func (*Record) MergeRecordByMaxTimeOfOldRec

func (rec *Record) MergeRecordByMaxTimeOfOldRec(newRec, oldRec *Record, newPos, oldPos, limitRows int, ascending bool) (*Record, int, int)

func (*Record) MergeRecordDescend

func (rec *Record) MergeRecordDescend(newRec, oldRec *Record)

func (*Record) MergeRecordLimitRows

func (rec *Record) MergeRecordLimitRows(newRec, oldRec *Record, newPos, oldPos, limitRows int) (int, int)

func (*Record) MergeRecordLimitRowsDescend

func (rec *Record) MergeRecordLimitRowsDescend(newRec, oldRec *Record, newPos, oldPos, limitRows int) (int, int)

func (*Record) MinTime

func (rec *Record) MinTime(isAscending bool) int64

func (*Record) PadRecord

func (rec *Record) PadRecord(other *Record)

func (*Record) ReserveColVal

func (rec *Record) ReserveColVal(size int)

func (*Record) ReserveColumnRows

func (rec *Record) ReserveColumnRows(rows int)

func (*Record) ReserveSchema

func (rec *Record) ReserveSchema(size int)

func (*Record) ReserveSchemaAndColVal

func (rec *Record) ReserveSchemaAndColVal(size int)

func (*Record) Reset

func (rec *Record) Reset()

func (*Record) ResetDeep

func (rec *Record) ResetDeep()

func (*Record) ResetForReuse

func (rec *Record) ResetForReuse()

func (*Record) ResetWithSchema

func (rec *Record) ResetWithSchema(schema Schemas)

func (*Record) ResizeBySchema added in v1.0.0

func (rec *Record) ResizeBySchema(schema Schemas, initColMeta bool)

func (*Record) Reuse

func (rec *Record) Reuse()

func (*Record) RowNums

func (rec *Record) RowNums() int

func (*Record) Schemas

func (rec *Record) Schemas() []Field

func (*Record) SetSchema

func (rec *Record) SetSchema(schemas Schemas)

func (*Record) Size

func (rec *Record) Size() int

func (*Record) SliceFromRecord

func (rec *Record) SliceFromRecord(srcRec *Record, start, end int)

func (*Record) Split

func (rec *Record) Split(dst []Record, maxRows int) []Record

func (*Record) String

func (rec *Record) String() string

func (Record) Swap

func (rec Record) Swap(i, j int)

func (*Record) Time

func (rec *Record) Time(i int) int64

func (*Record) TimeColumn

func (rec *Record) TimeColumn() *ColVal

func (*Record) Times

func (rec *Record) Times() []int64

func (*Record) TransIntervalRec2Rec added in v1.0.0

func (rec *Record) TransIntervalRec2Rec(re *Record, start, end int)

func (*Record) TryPadColumn

func (rec *Record) TryPadColumn()

func (*Record) UpdateIntervalRecRow added in v1.0.0

func (rec *Record) UpdateIntervalRecRow(re *Record, recRow, row int)

type RecordPool

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

func NewRecordPool

func NewRecordPool(recordType RecordType) *RecordPool

func (*RecordPool) Get

func (p *RecordPool) Get() *Record

func (*RecordPool) Put

func (p *RecordPool) Put(rec *Record)

type RecordType added in v1.0.0

type RecordType uint8
const (
	IntervalRecordPool RecordType = iota
	FileCursorPool
	AggPool
	TsmMergePool
	TsspSequencePool
	SequenceAggPool
	SeriesPool
	UnknownPool
)

type Schemas

type Schemas []Field

func (Schemas) Copy

func (sh Schemas) Copy() Schemas

func (Schemas) Equal

func (sh Schemas) Equal(to Schemas) bool

func (Schemas) Field

func (sh Schemas) Field(i int) *Field

func (Schemas) FieldIndex

func (sh Schemas) FieldIndex(name string) int

func (Schemas) Len

func (sh Schemas) Len() int

func (Schemas) Less

func (sh Schemas) Less(i, j int) bool

func (Schemas) String

func (sh Schemas) String() string

func (Schemas) Swap

func (sh Schemas) Swap(i, j int)

type SortAux

type SortAux struct {
	RowIds  []int32
	Times   []int64
	SortRec *Record
}

func (*SortAux) Init added in v1.0.0

func (aux *SortAux) Init(times []int64)

func (*SortAux) InitRecord

func (aux *SortAux) InitRecord(schemas Schemas)

func (*SortAux) Len

func (aux *SortAux) Len() int

func (*SortAux) Less

func (aux *SortAux) Less(i, j int) bool

func (*SortAux) Swap

func (aux *SortAux) Swap(i, j int)

type SortHelper added in v1.0.0

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

func (*SortHelper) Sort added in v1.0.0

func (h *SortHelper) Sort(rec *Record, aux *SortAux)

type TimeRange

type TimeRange struct {
	Min, Max int64
}

func (TimeRange) Overlaps

func (t TimeRange) Overlaps(min, max int64) bool

type Times added in v1.0.0

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

func NewTimes added in v1.0.0

func NewTimes(v []int64) *Times

Jump to

Keyboard shortcuts

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