record

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

nolint

nolint

nolint

Index

Constants

View Source
const (
	TimeField           = "time"
	SeqIDField          = "__seq_id___"
	RecMaxLenForRuse    = 512
	RecMaxRowNumForRuse = 2024
)
View Source
const TimeClusterCol = "clustered_time"

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 = util.TimeRange{Min: influxql.MinTime, Max: influxql.MaxTime}

Functions

func ArrowBoolColToNativeBoolCol added in v1.1.0

func ArrowBoolColToNativeBoolCol(buffer *memory.Buffer, colVal *ColVal)

func ArrowColToNativeColWithNull added in v1.1.0

func ArrowColToNativeColWithNull(colArr array.Interface, colVal *ColVal, colType int) error

func ArrowColToNativeColWithoutNull added in v1.1.0

func ArrowColToNativeColWithoutNull(buffer []*memory.Buffer, colVal *ColVal, colType int) error

func ArrowRecordToNativeRecord added in v1.1.0

func ArrowRecordToNativeRecord(rec array.Record, r *Record) error

func ArrowTypeToNativeType added in v1.1.0

func ArrowTypeToNativeType(dataType arrow.DataType) int

func CheckCol added in v1.0.0

func CheckCol(col *ColVal, typ int)

func CheckRecord

func CheckRecord(rec *Record)

func CheckTimes added in v1.1.0

func CheckTimes(times []int64)

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 ReverseBitMap

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

func ToInfluxqlTypes

func ToInfluxqlTypes(ty int) influxql.DataType

func ToModelTypes

func ToModelTypes(ty influxql.DataType) int

func ToPrimitiveType added in v1.1.0

func ToPrimitiveType(ty int32) int

ToPrimitiveType convert the tag to the primitive data type. Integer is supported later.

func Uint64ToBytesUnsafe added in v1.0.0

func Uint64ToBytesUnsafe(id uint64) []byte

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)

func ValueIndexRange added in v1.2.0

func ValueIndexRange(bitMap []byte, bitOffset int, bmStart, bmEnd int, pos int, posValidCount int) (int, int)

Types

type BooleanSlice added in v1.1.0

type BooleanSlice struct {
	V []bool
}

func (*BooleanSlice) Compare added in v1.1.0

func (sli *BooleanSlice) Compare(i, j int) int

func (*BooleanSlice) CompareSingleValue added in v1.1.0

func (sli *BooleanSlice) CompareSingleValue(data interface{}, positionX, positionY int) (int, error)

func (*BooleanSlice) PadBoolSlice added in v1.1.0

func (sli *BooleanSlice) PadBoolSlice(cv *ColVal)

func (*BooleanSlice) PadBoolSliceWithLimit added in v1.2.0

func (sli *BooleanSlice) PadBoolSliceWithLimit(cv *ColVal, compareLength int)

func (*BooleanSlice) Swap added in v1.1.0

func (sli *BooleanSlice) Swap(i, j int)

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 ColAux added in v1.2.0

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

type ColMergePerformer added in v1.0.0

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

func NewColMergePerformer added in v1.1.0

func NewColMergePerformer() *ColMergePerformer

func (*ColMergePerformer) InitColVal added in v1.1.0

func (p *ColMergePerformer) InitColVal(order, unordered *ColVal, typ int)

func (*ColMergePerformer) InitTimes added in v1.1.0

func (p *ColMergePerformer) InitTimes(order, unordered []int64)

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) MergedResult added in v1.1.0

func (p *ColMergePerformer) MergedResult() (*ColVal, []int64)

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, pos int, posValidCount 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) AppendByteSlice added in v1.2.0

func (cv *ColVal) AppendByteSlice(v []byte)

func (*ColVal) AppendColVal

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

func (*ColVal) AppendColValFast added in v1.2.0

func (cv *ColVal) AppendColValFast(srcCol *ColVal, colType, start, end int, pos int, posValidCount 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) BytesUnsafe added in v1.1.0

func (cv *ColVal) BytesUnsafe(i int) ([]byte, 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) GetOffsAndLens added in v1.2.0

func (cv *ColVal) GetOffsAndLens() ([]int32, []int32)

func (*ColVal) GetValIndexRange

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

func (*ColVal) Init

func (cv *ColVal) Init()

func (*ColVal) InitBitMap added in v1.1.0

func (cv *ColVal) InitBitMap(len int)

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) Marshal added in v1.1.0

func (cv *ColVal) Marshal(buf []byte) ([]byte, error)

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) RemoveNilOffset added in v1.2.0

func (cv *ColVal) RemoveNilOffset() []uint32

func (*ColVal) RepairBitmap added in v1.2.0

func (cv *ColVal) RepairBitmap()

func (*ColVal) ReserveBitmap

func (cv *ColVal) ReserveBitmap(bytes int)

func (*ColVal) RowBitmap

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

func (*ColVal) Size added in v1.1.0

func (cv *ColVal) Size() int

func (*ColVal) Split

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

func (*ColVal) SplitColBySize added in v1.2.0

func (cv *ColVal) SplitColBySize(dst []ColVal, rowsPerSegment []int, refType int) []ColVal

func (*ColVal) StringValue added in v1.1.0

func (cv *ColVal) StringValue(i int) ([]byte, bool)

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) SubFloatValues

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

func (*ColVal) SubIntegerValues

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

func (*ColVal) Unmarshal added in v1.1.0

func (cv *ColVal) Unmarshal(buf []byte) error

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) 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) ValidCount

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

func (*ColVal) ValidString

func (cv *ColVal) ValidString() bool

type ColumnSortHelper added in v1.2.0

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

func NewColumnSortHelper added in v1.2.0

func NewColumnSortHelper() *ColumnSortHelper

func (*ColumnSortHelper) Release added in v1.2.0

func (h *ColumnSortHelper) Release()

func (*ColumnSortHelper) Sort added in v1.2.0

func (h *ColumnSortHelper) Sort(rec *Record) *Record

type Field

type Field struct {
	Type int
	Name string
}

func (*Field) IsString added in v1.0.0

func (f *Field) IsString() bool

func (*Field) Marshal added in v1.1.0

func (f *Field) Marshal(buf []byte) ([]byte, error)

func (*Field) Size added in v1.1.0

func (f *Field) Size() int

func (*Field) String

func (f *Field) String() string

func (*Field) Unmarshal added in v1.1.0

func (f *Field) Unmarshal(buf []byte) error

type FloatSlice added in v1.1.0

type FloatSlice struct {
	V []float64
}

func (*FloatSlice) Compare added in v1.1.0

func (sli *FloatSlice) Compare(i, j int) int

func (*FloatSlice) CompareSingleValue added in v1.1.0

func (sli *FloatSlice) CompareSingleValue(data interface{}, positionX, positionY int) (int, error)

func (*FloatSlice) PadFloatSlice added in v1.1.0

func (sli *FloatSlice) PadFloatSlice(cv *ColVal)

func (*FloatSlice) PadFloatSliceWithLimit added in v1.2.0

func (sli *FloatSlice) PadFloatSliceWithLimit(cv *ColVal, compareLength int)

func (*FloatSlice) Swap added in v1.1.0

func (sli *FloatSlice) Swap(i, j int)

type IntegerSlice added in v1.1.0

type IntegerSlice struct {
	V []int64
}

func (*IntegerSlice) Compare added in v1.1.0

func (sli *IntegerSlice) Compare(i, j int) int

func (*IntegerSlice) CompareSingleValue added in v1.1.0

func (sli *IntegerSlice) CompareSingleValue(data interface{}, positionX, positionY int) (int, error)

func (*IntegerSlice) PadIntSlice added in v1.1.0

func (sli *IntegerSlice) PadIntSlice(cv *ColVal)

func (*IntegerSlice) PadIntSliceWithLimit added in v1.2.0

func (sli *IntegerSlice) PadIntSliceWithLimit(cv *ColVal, compareLength int)

func (*IntegerSlice) Swap added in v1.1.0

func (sli *IntegerSlice) Swap(i, j int)

type MergeColVal added in v1.0.0

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

func NewMergeColVal added in v1.0.0

func NewMergeColVal() *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)

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 PrimaryKey added in v1.1.0

type PrimaryKey struct {
	Key  string
	Type int32
}

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

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, firstOrLastRecIdxs []int)

func (*Record) AppendIntervalEmptyRows added in v1.0.0

func (rec *Record) AppendIntervalEmptyRows(start, step, num int64, initRecMeta bool, firstOrLastRecIdxs []int)

func (*Record) AppendRec

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

func (*Record) AppendRecFast added in v1.2.0

func (rec *Record) AppendRecFast(srcRec *Record, start, end int, colPos []int, colPosValidCount []int)

func (*Record) AppendRecForFilter added in v1.1.1

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

AppendRecForFilter crop redundant columns, which are not required after filtering. ridIdx indicates the index of a redundant column.

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) 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, firstOrLastRecIdxs []int)

func (*Record) Clone

func (rec *Record) Clone() *Record

func (*Record) CodecSize added in v1.1.0

func (rec *Record) CodecSize() int

func (*Record) ColNums

func (rec *Record) ColNums() int

func (*Record) Column

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

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 util.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(dst *Record, colAux *ColAux) *Record

func (Record) Len

func (rec Record) Len() int

func (Record) Less

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

func (*Record) Marshal added in v1.1.0

func (rec *Record) Marshal(buf []byte) ([]byte, error)

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) (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) Unmarshal added in v1.1.0

func (rec *Record) Unmarshal(buf []byte) error

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
	FileLoopCursorPool
	FileCursorValidRowPool
	FileCursorFilterRecordPool
	AggPool
	TsmMergePool
	TsspSequencePool
	SequenceAggPool
	SeriesPool
	ColumnReaderPool
	LogStoreReaderPool
	UnknownPool
)

type Schemas

type Schemas []Field

func ArrowSchemaToNativeSchema added in v1.1.0

func ArrowSchemaToNativeSchema(schema *arrow.Schema) Schemas

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
	// contains filtered or unexported fields
}

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) InitSections added in v1.2.0

func (aux *SortAux) InitSections()

func (*SortAux) Len

func (aux *SortAux) Len() int

func (*SortAux) Less

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

func (*SortAux) RowIndex added in v1.2.0

func (aux *SortAux) RowIndex(i int) (int, int, int)

func (*SortAux) SectionLen added in v1.2.0

func (aux *SortAux) SectionLen() int

func (*SortAux) Swap

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

type SortData added in v1.1.0

type SortData struct {
	Times         []int64
	RowIds        []int32
	DuplicateRows []bool
	Data          []SortItem
	SortRec       *Record
	// contains filtered or unexported fields
}

func (*SortData) Init added in v1.1.0

func (d *SortData) Init(times []int64, sortKey []PrimaryKey, record *Record, tcDuration time.Duration)

func (*SortData) InitDuplicateRows added in v1.1.0

func (d *SortData) InitDuplicateRows(size int, record *Record, deduplicate bool)

func (*SortData) InitRecord added in v1.1.0

func (d *SortData) InitRecord(schemas Schemas)

func (*SortData) Len added in v1.1.0

func (d *SortData) Len() int

func (*SortData) Less added in v1.1.0

func (d *SortData) Less(i, j int) bool

func (*SortData) Swap added in v1.1.0

func (d *SortData) Swap(i, j int)

type SortHelper added in v1.0.0

type SortHelper struct {
	SortData *SortData //Multi-field sort data
	// contains filtered or unexported fields
}

func NewSortHelper added in v1.1.0

func NewSortHelper() *SortHelper

func (*SortHelper) Release added in v1.1.0

func (h *SortHelper) Release()

func (*SortHelper) Sort added in v1.0.0

func (h *SortHelper) Sort(rec *Record) *Record

func (*SortHelper) SortForColumnStore added in v1.1.0

func (h *SortHelper) SortForColumnStore(rec *Record, orderBy []PrimaryKey, deduplicate bool, tcDuration time.Duration) *Record

type SortItem added in v1.1.0

type SortItem interface {
	Compare(i, j int) int
	CompareSingleValue(data interface{}, positionX, positionY int) (int, error)
	Swap(i, j int)
}

type StringSlice added in v1.1.0

type StringSlice struct {
	V []string
}

func (*StringSlice) Compare added in v1.1.0

func (sli *StringSlice) Compare(i, j int) int

func (*StringSlice) CompareSingleValue added in v1.1.0

func (sli *StringSlice) CompareSingleValue(data interface{}, positionX, positionY int) (int, error)

func (*StringSlice) PadStringSlice added in v1.1.0

func (sli *StringSlice) PadStringSlice(cv *ColVal)

func (*StringSlice) PadStringSliceWithLimit added in v1.2.0

func (sli *StringSlice) PadStringSliceWithLimit(cv *ColVal, compareLength int)

func (*StringSlice) Swap added in v1.1.0

func (sli *StringSlice) Swap(i, j int)

type Times added in v1.0.0

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

Jump to

Keyboard shortcuts

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