record

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

nolint

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 Bytes2Int8Slice

func Bytes2Int8Slice(b []byte) []int8

func Bytes2Uint16Slice

func Bytes2Uint16Slice(b []byte) []uint16

func Bytes2Uint32Slice

func Bytes2Uint32Slice(b []byte) []uint32

func Bytes2Uint64Slice

func Bytes2Uint64Slice(b []byte) []uint64

func Bytes2str

func Bytes2str(b []byte) string

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 GetRecordBooleanFirst

func GetRecordBooleanFirst(dscRe, re *Record, index int)

func GetRecordBooleanLast

func GetRecordBooleanLast(dscRe, re *Record, index int)

func GetRecordBooleanMax

func GetRecordBooleanMax(dscRe, re *Record, index int)

func GetRecordBooleanMin

func GetRecordBooleanMin(dscRe, re *Record, index int)

func GetRecordColumnBooleanFirst

func GetRecordColumnBooleanFirst(dscRe, re *Record, index int)

func GetRecordColumnBooleanLast

func GetRecordColumnBooleanLast(dscRe, re *Record, index int)

func GetRecordColumnBooleanMax

func GetRecordColumnBooleanMax(dstRe, re *Record, index int)

func GetRecordColumnBooleanMin

func GetRecordColumnBooleanMin(dstRe, re *Record, index int)

func GetRecordColumnCount

func GetRecordColumnCount(dstRe, re *Record, index int)

func GetRecordColumnFloatFirst

func GetRecordColumnFloatFirst(dscRe, re *Record, index int)

func GetRecordColumnFloatLast

func GetRecordColumnFloatLast(dscRe, re *Record, index int)

func GetRecordColumnFloatMax

func GetRecordColumnFloatMax(dstRe, re *Record, index int)

func GetRecordColumnFloatMin

func GetRecordColumnFloatMin(dstRe, re *Record, index int)

func GetRecordColumnFloatSum

func GetRecordColumnFloatSum(dstRe, re *Record, index int)

func GetRecordColumnIntegerFirst

func GetRecordColumnIntegerFirst(dscRe, re *Record, index int)

func GetRecordColumnIntegerLast

func GetRecordColumnIntegerLast(dscRe, re *Record, index int)

func GetRecordColumnIntegerMax

func GetRecordColumnIntegerMax(dstRe, re *Record, index int)

func GetRecordColumnIntegerMin

func GetRecordColumnIntegerMin(dstRe, re *Record, index int)

func GetRecordColumnIntegerSum

func GetRecordColumnIntegerSum(dstRe, re *Record, index int)

func GetRecordColumnStringFirst

func GetRecordColumnStringFirst(dscRe, re *Record, index int)

func GetRecordColumnStringLast

func GetRecordColumnStringLast(dscRe, re *Record, index int)

func GetRecordCount

func GetRecordCount(dscRe, re *Record, index int)

GetRecordCount used for count aggregated call only for multiple series record which has been count with method count += 1.

func GetRecordDefault

func GetRecordDefault(dscRe, re *Record, index int)

func GetRecordFloatFirst

func GetRecordFloatFirst(dscRe, re *Record, index int)

func GetRecordFloatLast

func GetRecordFloatLast(dscRe, re *Record, index int)

func GetRecordFloatMax

func GetRecordFloatMax(dscRe, re *Record, index int)

func GetRecordFloatMin

func GetRecordFloatMin(dscRe, re *Record, index int)

func GetRecordFloatSum

func GetRecordFloatSum(dscRe, re *Record, index int)

func GetRecordIntegerFirst

func GetRecordIntegerFirst(dscRe, re *Record, index int)

func GetRecordIntegerLast

func GetRecordIntegerLast(dscRe, re *Record, index int)

func GetRecordIntegerMax

func GetRecordIntegerMax(dscRe, re *Record, index int)

func GetRecordIntegerMin

func GetRecordIntegerMin(dscRe, re *Record, index int)

func GetRecordIntegerSum

func GetRecordIntegerSum(dscRe, re *Record, index int)

func GetRecordStringFirst

func GetRecordStringFirst(dscRe, re *Record, index int)

func GetRecordStringLast

func GetRecordStringLast(dscRe, re *Record, index int)

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 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 ReleaseAppendRecord

func ReleaseAppendRecord(rec *AppendRecord)

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 Uint32Slice2byte

func Uint32Slice2byte(b []uint32) []byte

func Uint64Slice2byte

func Uint64Slice2byte(b []uint64) []byte

func Uint64ToBytes

func Uint64ToBytes(id uint64) []byte

func Uint64ToFloat64

func Uint64ToFloat64(v uint64) float64

Types

type AppendColVal

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

func (*AppendColVal) Append

func (cv *AppendColVal) Append(src *AppendColVal, typ, offset, limit int)

func (*AppendColVal) AppendSequence

func (cv *AppendColVal) AppendSequence(src *AppendColVal, typ, limit int)

func (*AppendColVal) Reset

func (cv *AppendColVal) Reset()

func (*AppendColVal) Skip

func (cv *AppendColVal) Skip(typ, limit int)

type AppendColValPool

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

func (*AppendColValPool) GetWithSize

func (p *AppendColValPool) GetWithSize(size int) []AppendColVal

func (*AppendColValPool) Put

func (p *AppendColValPool) Put(v []AppendColVal)

type AppendRecord

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

func NewAppendRecord

func NewAppendRecord(rec *Record) *AppendRecord

func (*AppendRecord) Append

func (r *AppendRecord) Append(src *AppendRecord, offset, limit int) error

Append append based on offset and limit

func (*AppendRecord) AppendNotNil

func (r *AppendRecord) AppendNotNil(new *AppendRecord)

func (*AppendRecord) AppendSequence

func (r *AppendRecord) AppendSequence(src *AppendRecord, limit int) error

AppendSequence Can only be appended in sequence starting from 0, {limit} elements are appended at a time record the position of the last time the next call, begin from the last position

func (*AppendRecord) Check

func (r *AppendRecord) Check(src *AppendRecord) error

func (*AppendRecord) GetCols

func (r *AppendRecord) GetCols() []AppendColVal

func (*AppendRecord) Skip

func (r *AppendRecord) Skip(n int)

Skip skip N elements

func (*AppendRecord) UpdateCols

func (r *AppendRecord) UpdateCols()

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

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

func (*ColVal) BooleanValues

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

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

func (f *Field) String() string

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

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

func (*Record) AppendRecForAggTagSet

func (rec *Record) AppendRecForAggTagSet(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) AppendTime

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

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, timeStart, timeEnd int)

func (*Record) CopyColVals

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

func (*Record) CopyWithCondition

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

func (*Record) CopyWithConditionDescend

func (rec *Record) CopyWithConditionDescend(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) 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) 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) SortAndDedupe

func (rec *Record) SortAndDedupe(sortAux *SortAux)

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

func (rec *Record) TryPadColumn()

type RecordPool

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

func NewRecordPool

func NewRecordPool() *RecordPool

func (*RecordPool) Get

func (p *RecordPool) Get() *Record

func (*RecordPool) Put

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

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

type TimeRange struct {
	Min, Max int64
}

func (TimeRange) Overlaps

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

Jump to

Keyboard shortcuts

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