Documentation
¶
Index ¶
- func Abs(v int64) int64
- func AbsInt(x int) int
- func BinarySearch(target int, nums []int) bool
- func BinarySearchForNils(array []uint16, k uint16) int
- func CompareSlice(a, b []int) bool
- func EqualMap(tags1, tags2 map[string]string) bool
- func FilterNullColumnQuery(stmt *influxql.SelectStatement) bool
- func GenerateNodeId() uint64
- func Intersect(a, b []int) []int
- func IsExactStatisticQuery(stmt *influxql.SelectStatement) bool
- func IsFullSeriesQuery(stmt *influxql.SelectStatement) bool
- func IsSpecificSeriesQuery(stmt *influxql.SelectStatement) bool
- func IsSubSlice(subS, s []int) bool
- func LinearInterpolateFloat(currTime, prevTime, nextTime int64, prevValue, nextValue float64) float64
- func LinearInterpolateInteger(currTime, prevTime, nextTime int64, prevValue, nextValue int64) int64
- func MaxInt(x, y int) int
- func MaxInt64(x, y int64) int64
- func MinInt64(x, y int64) int64
- func MustParseExpr(s string) influxql.Expr
- func ParseFields(s string) (influxql.Fields, error)
- func RegistryCatalogCreator(creator CatalogCreator) bool
- func SortS1ByS2(s1, s2 []int)
- func TransToBoolean(v interface{}) (bool, bool)
- func TransToFloat(v interface{}) (float64, bool)
- func TransToInteger(v interface{}) (int64, bool)
- func TransToString(v interface{}) (string, bool)
- func VerifyHintStmt(stmt *influxql.SelectStatement, opt Options) error
- func WalkQueryNodeInPostOrder(v QueryNodeVisitor, node QueryNode)
- func WalkQueryNodeInPreOrder(v QueryNodeVisitor, node QueryNode)
- type Catalog
- type CatalogCreator
- type CatalogCreatorFactory
- type ContextKey
- type Executor
- type ExecutorBuilderCreator
- type ExecutorBuilderOptimizer
- type ExprOptions
- func (o *ExprOptions) DerivativeInterval(interval Interval) Interval
- func (o *ExprOptions) ElapsedInterval() Interval
- func (o *ExprOptions) IntegralInterval() Interval
- func (o *ExprOptions) Marshal() *internal.ExprOptions
- func (o *ExprOptions) SlidingWindowInterval(interval Interval) Interval
- func (o *ExprOptions) Unmarshal(pb *internal.ExprOptions) error
- type FlattenQueryNodeVisitor
- type HintType
- type IShardsFragments
- type Interval
- type LimitType
- type LogicalPlanCost
- type MapConvert
- type OGSketchCompositeOperator
- type Options
- type PipelineExecutorBuilder
- type Planner
- type PromNestedCall
- type QueryNode
- type QueryNodeVisitor
- type RowDataType
- type RowDataTypeImpl
- func (s *RowDataTypeImpl) Aux() []int
- func (s *RowDataTypeImpl) CopyTo(dst *RowDataTypeImpl)
- func (s *RowDataTypeImpl) DeepEqual(to *RowDataTypeImpl) bool
- func (s *RowDataTypeImpl) Equal(to RowDataType) bool
- func (s *RowDataTypeImpl) Field(i int) *influxql.Field
- func (s *RowDataTypeImpl) FieldIndex(name string) int
- func (s *RowDataTypeImpl) Fields() influxql.Fields
- func (s *RowDataTypeImpl) IndexByName() map[string]int
- func (s *RowDataTypeImpl) MakeRefs() []influxql.VarRef
- func (s *RowDataTypeImpl) NumColumn() int
- func (s *RowDataTypeImpl) SetDataType(i int, t influxql.DataType)
- func (s *RowDataTypeImpl) SetIndexByName(m map[string]int)
- func (s *RowDataTypeImpl) SlimFields(ridIdx []int) RowDataType
- func (s *RowDataTypeImpl) UpdateByDownSampleFields(m map[string]string)
- type SelectDuration
- type ShardSelectDuration
- type StoreEngine
- type Trait
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinarySearch ¶
func BinarySearchForNils ¶
func CompareSlice ¶
func FilterNullColumnQuery ¶
func FilterNullColumnQuery(stmt *influxql.SelectStatement) bool
FilterNullColumnQuery Hint
func GenerateNodeId ¶
func GenerateNodeId() uint64
func IsExactStatisticQuery ¶
func IsExactStatisticQuery(stmt *influxql.SelectStatement) bool
IsExactStatisticQuery Hint
func IsFullSeriesQuery ¶
func IsFullSeriesQuery(stmt *influxql.SelectStatement) bool
IsFullSeriesQuery Hint
func IsSpecificSeriesQuery ¶
func IsSpecificSeriesQuery(stmt *influxql.SelectStatement) bool
IsSpecificSeriesQuery Hint
func IsSubSlice ¶
func LinearInterpolateFloat ¶
func MustParseExpr ¶
MustParseExpr parses an expression. Panic on error.
func RegistryCatalogCreator ¶
func RegistryCatalogCreator(creator CatalogCreator) bool
func SortS1ByS2 ¶
func SortS1ByS2(s1, s2 []int)
func TransToBoolean ¶
func TransToFloat ¶
func TransToInteger ¶
func TransToString ¶
func VerifyHintStmt ¶
func VerifyHintStmt(stmt *influxql.SelectStatement, opt Options) error
func WalkQueryNodeInPostOrder ¶
func WalkQueryNodeInPostOrder(v QueryNodeVisitor, node QueryNode)
func WalkQueryNodeInPreOrder ¶
func WalkQueryNodeInPreOrder(v QueryNodeVisitor, node QueryNode)
Types ¶
type Catalog ¶
type Catalog interface { GetColumnNames() []string GetQueryFields() influxql.Fields CloneField(f *influxql.Field) *influxql.Field HasCall() bool HasRowCount() bool HasMath() bool HasString() bool HasNonPreCall() bool CountField() map[int]bool HasMeanCall() bool HasBlankRowCall() bool HasInterval() bool HasFieldCondition() bool HasAuxTag() bool IsPromNestedCall(call *influxql.Call) bool HasPercentileOGSketch() bool HasPromNestedCall() bool Options() Options PromResetTime() bool Symbols() map[string]influxql.VarRef Mapping() map[influxql.Expr]influxql.VarRef Refs() map[string]*influxql.VarRef DerivedOrigCall(call *influxql.Call) influxql.VarRef DerivedRef(ref *influxql.VarRef) influxql.VarRef MakeRefs() []influxql.VarRef OrigCalls() map[string]*influxql.Call SetOpt(opt Options) Calls() map[string]*influxql.Call SlidingWindow() map[string]*influxql.Call HoltWinters() []*influxql.Field CompositeCall() map[string]*OGSketchCompositeOperator PromNestedCall() map[string]*PromNestedCall Binarys() map[string]*influxql.BinaryExpr Fields() influxql.Fields FieldsRef() influxql.VarRefs CountDistinct() *influxql.Call OnlyOneCallRef() *influxql.VarRef LimitType() LimitType HasLimit() bool HasCastorCall() bool LimitAndOffset() (int, int) MatchPreAgg() bool HasInSeriesAgg() bool CanSeqAggPushDown() bool CanCallsPushdown() bool CanAggPushDown() bool CanAggTagSet() bool ContainSeriesIgnoreCall() bool IsRefInQueryFields(ref *influxql.VarRef) bool IsRefInSymbolFields(ref *influxql.VarRef) bool IsTimeZero() bool HasStreamCall() bool HasSlidingWindowCall() bool HasHoltWintersCall() bool IsMultiMeasurements() bool HasGroupBy() bool Sources() influxql.Sources HasSubQuery() bool HasOptimizeAgg() bool HasOptimizeCall() bool GetSourcesNames() []string GetFieldType(i int) (int64, error) GetJoinCaseCount() int GetJoinCases() []*influxql.Join IsHoltWinters(val string) bool GetSortFields() influxql.SortFields SetUnnests(unnests []*influxql.Unnest) GetUnnests() influxql.Unnests HasUnnests() bool GetTimeRangeByTC() util.TimeRange GetPromCalls() []*influxql.PromSubCall }
type CatalogCreator ¶
type CatalogCreatorFactory ¶
type CatalogCreatorFactory struct {
// contains filtered or unexported fields
}
func GetCatalogFactoryInstance ¶
func GetCatalogFactoryInstance() *CatalogCreatorFactory
func NewCatalogCreatorFactory ¶
func NewCatalogCreatorFactory() *CatalogCreatorFactory
func (*CatalogCreatorFactory) Attach ¶
func (r *CatalogCreatorFactory) Attach(creator CatalogCreator)
type ContextKey ¶ added in v1.3.0
type ContextKey string
const ( // SecToNs is the number of nanoseconds in a second. SecToNs = int64(time.Second) QueryAborted ContextKey = "query_aborted" )
type ExecutorBuilderCreator ¶
type ExecutorBuilderCreator func() PipelineExecutorBuilder
type ExecutorBuilderOptimizer ¶
type ExecutorBuilderOptimizer func() Planner
type ExprOptions ¶
func (*ExprOptions) DerivativeInterval ¶
func (o *ExprOptions) DerivativeInterval(interval Interval) Interval
DerivativeInterval returns the time interval for the derivative function.
func (*ExprOptions) ElapsedInterval ¶
func (o *ExprOptions) ElapsedInterval() Interval
func (*ExprOptions) IntegralInterval ¶
func (o *ExprOptions) IntegralInterval() Interval
func (*ExprOptions) Marshal ¶
func (o *ExprOptions) Marshal() *internal.ExprOptions
func (*ExprOptions) SlidingWindowInterval ¶
func (o *ExprOptions) SlidingWindowInterval(interval Interval) Interval
SlidingWindowInterval returns the time interval for the sliding window function.
func (*ExprOptions) Unmarshal ¶
func (o *ExprOptions) Unmarshal(pb *internal.ExprOptions) error
type FlattenQueryNodeVisitor ¶
type FlattenQueryNodeVisitor struct {
// contains filtered or unexported fields
}
func (*FlattenQueryNodeVisitor) Nodes ¶
func (visitor *FlattenQueryNodeVisitor) Nodes() []QueryNode
func (*FlattenQueryNodeVisitor) Visit ¶
func (visitor *FlattenQueryNodeVisitor) Visit(node QueryNode) QueryNodeVisitor
type IShardsFragments ¶ added in v1.1.0
type IShardsFragments interface{}
type LimitType ¶
type LimitType int
const ( //SingleRowLimit means single row represents one Point and return number of limit points Per Tag. SingleRowLimit LimitType = 1 //MultipleRowsLimit means single row represents one Point and return number of limit points Per Tag. MultipleRowsLimit LimitType = 2 //SingleRowIgnoreTagLimit means single row represents one Point and return only number of limit points. SingleRowIgnoreTagLimit LimitType = 3 //MultipleRowsIgnoreTagLimit means single row represents one Point and return only number of limit points. MultipleRowsIgnoreTagLimit LimitType = 4 )
type LogicalPlanCost ¶
type LogicalPlanCost struct { // The total number of shards that are touched by this Logical. NumShards int64 // The total number of non-unique series that are accessed by this Logical. // This number matches the number of cursors created by the Logical since // one cursor is created for every series. NumSeries int64 // CachedValues returns the number of cached values that may be read by this // Logical. CachedValues int64 // The total number of non-unique files that may be accessed by this Logical. // This will count the number of files accessed by each series so files // will likely be double counted. NumFiles int64 // The number of blocks that had the potential to be accessed. BlocksRead int64 // The amount of data that can be potentially read. BlockSize int64 }
IteratorCost contains statistics retrieved for explaining what potential cost may be incurred by instantiating an iterator.
type MapConvert ¶
type MapConvert struct { }
func (*MapConvert) BoolToStruct ¶
func (c *MapConvert) BoolToStruct(m map[string]bool) map[string]struct{}
func (*MapConvert) Int64ToInt ¶
func (c *MapConvert) Int64ToInt(m map[string]int64) map[string]int
Int64ToInt convert map[string] int64 to map[string] int
func (*MapConvert) IntToInt64 ¶
func (c *MapConvert) IntToInt64(m map[string]int) map[string]int64
IntToInt64 convert map[string] int to map[string] int64
func (*MapConvert) StructToBool ¶
func (c *MapConvert) StructToBool(m map[string]struct{}) map[string]bool
type OGSketchCompositeOperator ¶ added in v1.0.0
type OGSketchCompositeOperator struct {
// contains filtered or unexported fields
}
func NewOGSketchCompositeOperator ¶ added in v1.0.0
func NewOGSketchCompositeOperator(i, m, qp *influxql.Call) *OGSketchCompositeOperator
func (*OGSketchCompositeOperator) GetInsertOp ¶ added in v1.0.0
func (o *OGSketchCompositeOperator) GetInsertOp() *influxql.Call
func (*OGSketchCompositeOperator) GetMergeOp ¶ added in v1.0.0
func (o *OGSketchCompositeOperator) GetMergeOp() *influxql.Call
func (*OGSketchCompositeOperator) GetQueryPerOp ¶ added in v1.0.0
func (o *OGSketchCompositeOperator) GetQueryPerOp() *influxql.Call
type Options ¶
type Options interface { GetLimit() int GetOffset() int HasInterval() bool GetCondition() influxql.Expr GetLocation() *time.Location GetOptDimension() []string GetHintType() HintType ISChunked() bool SetHintType(HintType) OptionsName() string IsAscending() bool SetAscending(bool) ChunkSizeNum() int GetStartTime() int64 GetEndTime() int64 GetMaxParallel() int Window(t int64) (start, end int64) GetGroupBy() map[string]struct{} GetInterval() time.Duration IsGroupByAllDims() bool GetSourcesNames() []string GetMeasurements() []*influxql.Measurement HaveOnlyCSStore() bool GetDimensions() []string SetFill(influxql.FillOption) IsTimeSorted() bool IsUnifyPlan() bool SetSortFields(influxql.SortFields) GetSortFields() influxql.SortFields FieldWildcard() bool GetStmtId() int GetLogQueryCurrId() string GetIterId() int32 IsIncQuery() bool CanTimeLimitPushDown() bool CanLimitPushDown() bool SetPromQuery(bool) IsPromQuery() bool IsPromInstantQuery() bool IsPromRangeQuery() bool GetPromStep() time.Duration GetPromRange() time.Duration GetPromLookBackDelta() time.Duration GetPromQueryOffset() time.Duration IsRangeVectorSelector() bool IsInstantVectorSelector() bool IsPromGroupAllOrWithout() bool IsPromGroupAll() bool IsPromWithout() bool IsWithout() bool IsExcept() bool GetLowerOpt() Options SetBinOp(bool) GetBinop() bool SetSimpleTagset(bool) GetSimpleTagset() bool SetCtx(ctx context.Context) GetCtx() context.Context }
type PipelineExecutorBuilder ¶
type PromNestedCall ¶ added in v1.3.0
type PromNestedCall struct {
// contains filtered or unexported fields
}
func NewPromNestedCall ¶ added in v1.3.0
func NewPromNestedCall(fc, ac *influxql.Call) *PromNestedCall
func (*PromNestedCall) GetAggCall ¶ added in v1.3.0
func (c *PromNestedCall) GetAggCall() *influxql.Call
func (*PromNestedCall) GetFuncCall ¶ added in v1.3.0
func (c *PromNestedCall) GetFuncCall() *influxql.Call
type QueryNode ¶
type QueryNode interface { ID() uint64 Digest() string Children() []QueryNode String() string Type() string ReplaceChild(int, QueryNode) ReplaceChildren([]QueryNode) Clone() QueryNode RowDataType() RowDataType RowExprOptions() []ExprOptions Dummy() bool DeriveOperations() Schema() Catalog Trait() Trait ApplyTrait(Trait) SetInputs([]QueryNode) SetSchema(Catalog) New(inputs []QueryNode, schema Catalog, eTrait []Trait) QueryNode }
type QueryNodeVisitor ¶
type QueryNodeVisitor interface {
Visit(QueryNode) QueryNodeVisitor
}
type RowDataType ¶
type RowDataType interface { Aux() []int Equal(RowDataType) bool Fields() influxql.Fields MakeRefs() []influxql.VarRef Field(int) *influxql.Field FieldIndex(string) int NumColumn() int SlimFields(ridIdx []int) RowDataType CopyTo(dst *RowDataTypeImpl) IndexByName() map[string]int UpdateByDownSampleFields(map[string]string) SetDataType(i int, t influxql.DataType) }
type RowDataTypeImpl ¶
type RowDataTypeImpl struct {
// contains filtered or unexported fields
}
func NewRowDataTypeImpl ¶
func NewRowDataTypeImpl(refs ...influxql.VarRef) *RowDataTypeImpl
func (*RowDataTypeImpl) Aux ¶
func (s *RowDataTypeImpl) Aux() []int
func (*RowDataTypeImpl) CopyTo ¶
func (s *RowDataTypeImpl) CopyTo(dst *RowDataTypeImpl)
func (*RowDataTypeImpl) DeepEqual ¶
func (s *RowDataTypeImpl) DeepEqual(to *RowDataTypeImpl) bool
func (*RowDataTypeImpl) Equal ¶
func (s *RowDataTypeImpl) Equal(to RowDataType) bool
func (*RowDataTypeImpl) FieldIndex ¶
func (s *RowDataTypeImpl) FieldIndex(name string) int
func (*RowDataTypeImpl) Fields ¶
func (s *RowDataTypeImpl) Fields() influxql.Fields
func (*RowDataTypeImpl) IndexByName ¶ added in v1.0.0
func (s *RowDataTypeImpl) IndexByName() map[string]int
func (*RowDataTypeImpl) MakeRefs ¶
func (s *RowDataTypeImpl) MakeRefs() []influxql.VarRef
func (*RowDataTypeImpl) NumColumn ¶
func (s *RowDataTypeImpl) NumColumn() int
func (*RowDataTypeImpl) SetDataType ¶ added in v1.1.0
func (s *RowDataTypeImpl) SetDataType(i int, t influxql.DataType)
func (*RowDataTypeImpl) SetIndexByName ¶ added in v1.0.0
func (s *RowDataTypeImpl) SetIndexByName(m map[string]int)
func (*RowDataTypeImpl) SlimFields ¶
func (s *RowDataTypeImpl) SlimFields(ridIdx []int) RowDataType
func (*RowDataTypeImpl) UpdateByDownSampleFields ¶ added in v1.0.0
func (s *RowDataTypeImpl) UpdateByDownSampleFields(m map[string]string)
type SelectDuration ¶
type SelectDuration struct { TotalDuration int64 PrepareDuration int64 IteratorDuration int64 LocalDuration ShardSelectDuration RemoteDuration ShardSelectDuration EmitDuration int64 Query string DB string QueryBatch int }
func (*SelectDuration) Duration ¶
func (s *SelectDuration) Duration(name string, d int64)
func (*SelectDuration) SetDatabase ¶
func (s *SelectDuration) SetDatabase(db string)
func (*SelectDuration) SetQuery ¶
func (s *SelectDuration) SetQuery(q string)
func (*SelectDuration) SetQueryBatch ¶
func (s *SelectDuration) SetQueryBatch(n int)
type ShardSelectDuration ¶
type ShardSelectDuration struct { IteratorDuration int64 TagSetDuration int64 LocationDuration int64 }
func (*ShardSelectDuration) Duration ¶
func (r *ShardSelectDuration) Duration(name string, d int64)
type StoreEngine ¶
type StoreEngine interface { ReportLoad() CreateLogicPlan(ctx context.Context, db string, ptId uint32, shardID uint64, sources influxql.Sources, schema Catalog) (QueryNode, error) ScanWithSparseIndex(ctx context.Context, db string, ptId uint32, shardIDS []uint64, schema Catalog) (IShardsFragments, error) GetIndexInfo(db string, ptId uint32, shardID uint64, schema Catalog) (interface{}, error) RowCount(db string, ptId uint32, shardIDS []uint64, schema Catalog) (int64, error) UnrefEngineDbPt(db string, ptId uint32) GetShardDownSampleLevel(db string, ptId uint32, shardID uint64) int }
Click to show internal directories.
Click to hide internal directories.