Documentation
¶
Index ¶
- Constants
- func MergePredicates(op ast.LogicalOperatorKind, predicates ...*datatypes.Predicate) (*datatypes.Predicate, error)
- func ReadFilterSource(id execute.DatasetID, r Reader, readSpec ReadFilterSpec, ...) execute.Source
- func ReadGroupSource(id execute.DatasetID, r Reader, readSpec ReadGroupSpec, ...) execute.Source
- func ReadTagKeysSource(id execute.DatasetID, r Reader, readSpec ReadTagKeysSpec, ...) execute.Source
- func ReadTagValuesSource(id execute.DatasetID, r Reader, readSpec ReadTagValuesSpec, ...) execute.Source
- func ReadWindowAggregateSource(id execute.DatasetID, r Reader, readSpec ReadWindowAggregateSpec, ...) execute.Source
- func ToStoragePredicate(n semantic.Expression, objectName string) (*datatypes.Predicate, error)
- type Authorizer
- type BucketsDecoder
- type Dependencies
- type FromDependencies
- type FromOpSpec
- type FromStorageProcedureSpec
- type FromStorageRule
- type GroupMode
- type LocalBucketsProcedureSpec
- type LocalBucketsRule
- type MetaClient
- type NameOrID
- type PointsWriter
- type PushDownBareAggregateRule
- type PushDownFilterRule
- type PushDownGroupAggregateRule
- type PushDownGroupRule
- type PushDownRangeRule
- type PushDownReadTagKeysRule
- type PushDownReadTagValuesRule
- type PushDownWindowAggregateByTimeRule
- type PushDownWindowAggregateRule
- type ReadFilterSpec
- type ReadGroupPhysSpec
- type ReadGroupSpec
- type ReadRangePhysSpec
- func (s *ReadRangePhysSpec) Copy() plan.ProcedureSpec
- func (s *ReadRangePhysSpec) Kind() plan.ProcedureKind
- func (s *ReadRangePhysSpec) LookupDatabase(_ context.Context, deps StorageDependencies, a execute.Administration) (string, string, error)
- func (s *ReadRangePhysSpec) TimeBounds(predecessorBounds *plan.Bounds) *plan.Bounds
- type ReadTagKeysPhysSpec
- type ReadTagKeysSpec
- type ReadTagValuesPhysSpec
- type ReadTagValuesSpec
- type ReadWindowAggregatePhysSpec
- type ReadWindowAggregateSpec
- type Reader
- type SortedPivotRule
- type Source
- type StorageDependencies
- type TableIterator
- type ToOpSpec
- type ToProcedureSpec
- type ToTransformation
- func (t *ToTransformation) Finish(id execute.DatasetID, err error)
- func (t *ToTransformation) Process(id execute.DatasetID, tbl flux.Table) error
- func (t *ToTransformation) RetractTable(id execute.DatasetID, key flux.GroupKey) error
- func (t *ToTransformation) UpdateProcessingTime(id execute.DatasetID, pt execute.Time) error
- func (t *ToTransformation) UpdateWatermark(id execute.DatasetID, pt execute.Time) error
Constants ¶
const ( ReadRangePhysKind = "ReadRangePhysKind" ReadGroupPhysKind = "ReadGroupPhysKind" ReadWindowAggregatePhysKind = "ReadWindowAggregatePhysKind" ReadTagKeysPhysKind = "ReadTagKeysPhysKind" ReadTagValuesPhysKind = "ReadTagValuesPhysKind" )
const ( ToKind = "influx1x/toKind" DefaultBufferSize = 5000 DefaultFieldColLabel = "_field" DefaultMeasurementColLabel = "_measurement" )
const BucketsKind = "influxdata/influxdb.localBuckets"
const FromKind = "influxDBFrom"
Variables ¶
This section is empty.
Functions ¶
func MergePredicates ¶ added in v1.9.0
func ReadFilterSource ¶ added in v1.7.8
func ReadFilterSource(id execute.DatasetID, r Reader, readSpec ReadFilterSpec, a execute.Administration) execute.Source
func ReadGroupSource ¶ added in v1.7.8
func ReadGroupSource(id execute.DatasetID, r Reader, readSpec ReadGroupSpec, a execute.Administration) execute.Source
func ReadTagKeysSource ¶ added in v1.7.8
func ReadTagKeysSource(id execute.DatasetID, r Reader, readSpec ReadTagKeysSpec, a execute.Administration) execute.Source
func ReadTagValuesSource ¶ added in v1.7.8
func ReadTagValuesSource(id execute.DatasetID, r Reader, readSpec ReadTagValuesSpec, a execute.Administration) execute.Source
func ReadWindowAggregateSource ¶ added in v1.9.0
func ReadWindowAggregateSource(id execute.DatasetID, r Reader, readSpec ReadWindowAggregateSpec, a execute.Administration) execute.Source
func ToStoragePredicate ¶ added in v1.9.0
Types ¶
type Authorizer ¶
type BucketsDecoder ¶
type BucketsDecoder struct {
// contains filtered or unexported fields
}
func (*BucketsDecoder) Close ¶
func (bd *BucketsDecoder) Close() error
type Dependencies ¶
type Dependencies struct { StorageDeps StorageDependencies FluxDeps flux.Dependency }
func NewDependencies ¶ added in v1.7.9
func NewDependencies( mc MetaClient, reader Reader, auth Authorizer, authEnabled bool, writer PointsWriter, ) (Dependencies, error)
type FromDependencies ¶ added in v1.7.9
type FromDependencies struct { Reader Reader MetaClient MetaClient Authorizer Authorizer AuthEnabled bool }
func (FromDependencies) Validate ¶ added in v1.7.9
func (d FromDependencies) Validate() error
type FromOpSpec ¶
type FromOpSpec = influxdb.FromOpSpec
type FromStorageProcedureSpec ¶ added in v1.9.0
func (*FromStorageProcedureSpec) Copy ¶ added in v1.9.0
func (s *FromStorageProcedureSpec) Copy() plan.ProcedureSpec
func (*FromStorageProcedureSpec) Kind ¶ added in v1.9.0
func (s *FromStorageProcedureSpec) Kind() plan.ProcedureKind
func (*FromStorageProcedureSpec) PostPhysicalValidate ¶ added in v1.9.0
func (s *FromStorageProcedureSpec) PostPhysicalValidate(id plan.NodeID) error
type FromStorageRule ¶ added in v1.9.0
type FromStorageRule struct{}
func (FromStorageRule) Name ¶ added in v1.9.0
func (rule FromStorageRule) Name() string
func (FromStorageRule) Pattern ¶ added in v1.9.0
func (rule FromStorageRule) Pattern() plan.Pattern
type GroupMode ¶
type GroupMode int
func ToGroupMode ¶
ToGroupMode accepts the group mode from Flux and produces the appropriate storage group mode.
type LocalBucketsProcedureSpec ¶ added in v1.9.0
type LocalBucketsProcedureSpec struct {
plan.DefaultCost
}
func (*LocalBucketsProcedureSpec) Copy ¶ added in v1.9.0
func (s *LocalBucketsProcedureSpec) Copy() plan.ProcedureSpec
func (*LocalBucketsProcedureSpec) Kind ¶ added in v1.9.0
func (s *LocalBucketsProcedureSpec) Kind() plan.ProcedureKind
type LocalBucketsRule ¶ added in v1.9.0
type LocalBucketsRule struct{}
func (LocalBucketsRule) Name ¶ added in v1.9.0
func (rule LocalBucketsRule) Name() string
func (LocalBucketsRule) Pattern ¶ added in v1.9.0
func (rule LocalBucketsRule) Pattern() plan.Pattern
type MetaClient ¶
type MetaClient interface { Databases() []meta.DatabaseInfo Database(name string) *meta.DatabaseInfo }
type PointsWriter ¶ added in v1.9.0
type PointsWriter interface {
WritePointsInto(request *coordinator.IntoWriteRequest) error
}
type PushDownBareAggregateRule ¶ added in v1.9.0
type PushDownBareAggregateRule struct{}
PushDownBareAggregateRule is a rule that allows pushing down of aggregates that are directly over a ReadRange source.
func (PushDownBareAggregateRule) Name ¶ added in v1.9.0
func (p PushDownBareAggregateRule) Name() string
func (PushDownBareAggregateRule) Pattern ¶ added in v1.9.0
func (p PushDownBareAggregateRule) Pattern() plan.Pattern
type PushDownFilterRule ¶ added in v1.7.8
type PushDownFilterRule struct{}
PushDownFilterRule is a rule that pushes filters into from procedures to be evaluated in the storage layer. This rule is likely to be replaced by a more generic rule when we have a better framework for pushing filters, etc into sources.
func (PushDownFilterRule) Name ¶ added in v1.7.8
func (PushDownFilterRule) Name() string
func (PushDownFilterRule) Pattern ¶ added in v1.7.8
func (PushDownFilterRule) Pattern() plan.Pattern
type PushDownGroupAggregateRule ¶ added in v1.9.0
type PushDownGroupAggregateRule struct{}
Push Down of group aggregates. ReadGroupPhys |> { count }
func (PushDownGroupAggregateRule) Name ¶ added in v1.9.0
func (PushDownGroupAggregateRule) Name() string
func (PushDownGroupAggregateRule) Pattern ¶ added in v1.9.0
func (rule PushDownGroupAggregateRule) Pattern() plan.Pattern
type PushDownGroupRule ¶ added in v1.7.8
type PushDownGroupRule struct{}
PushDownGroupRule pushes down a group operation to storage
func (PushDownGroupRule) Name ¶ added in v1.7.8
func (rule PushDownGroupRule) Name() string
func (PushDownGroupRule) Pattern ¶ added in v1.7.8
func (rule PushDownGroupRule) Pattern() plan.Pattern
type PushDownRangeRule ¶ added in v1.7.8
type PushDownRangeRule struct{}
PushDownRangeRule pushes down a range filter to storage
func (PushDownRangeRule) Name ¶ added in v1.7.8
func (rule PushDownRangeRule) Name() string
func (PushDownRangeRule) Pattern ¶ added in v1.7.8
func (rule PushDownRangeRule) Pattern() plan.Pattern
Pattern matches 'from |> range'
type PushDownReadTagKeysRule ¶ added in v1.7.8
type PushDownReadTagKeysRule struct{}
PushDownReadTagKeysRule matches 'ReadRange |> keys() |> keep() |> distinct()'. The 'from()' must have already been merged with 'range' and, optionally, may have been merged with 'filter'. If any other properties have been set on the from procedure, this rule will not rewrite anything.
func (PushDownReadTagKeysRule) Name ¶ added in v1.7.8
func (rule PushDownReadTagKeysRule) Name() string
func (PushDownReadTagKeysRule) Pattern ¶ added in v1.7.8
func (rule PushDownReadTagKeysRule) Pattern() plan.Pattern
type PushDownReadTagValuesRule ¶ added in v1.7.8
type PushDownReadTagValuesRule struct{}
PushDownReadTagValuesRule matches 'ReadRange |> keep(columns: [tag]) |> group() |> distinct(column: tag)'. The 'from()' must have already been merged with 'range' and, optionally, may have been merged with 'filter'. If any other properties have been set on the from procedure, this rule will not rewrite anything.
func (PushDownReadTagValuesRule) Name ¶ added in v1.7.8
func (rule PushDownReadTagValuesRule) Name() string
func (PushDownReadTagValuesRule) Pattern ¶ added in v1.7.8
func (rule PushDownReadTagValuesRule) Pattern() plan.Pattern
type PushDownWindowAggregateByTimeRule ¶ added in v1.9.0
type PushDownWindowAggregateByTimeRule struct{}
PushDownWindowAggregateWithTimeRule will match the given pattern, matching the definition of the `aggregateMin` function in Flux. ReadWindowAggregatePhys |> duplicate |> window(every: inf)
If this pattern matches and the arguments to duplicate are matching time column names, it will set the time column on the spec.
func (PushDownWindowAggregateByTimeRule) Name ¶ added in v1.9.0
func (PushDownWindowAggregateByTimeRule) Name() string
func (PushDownWindowAggregateByTimeRule) Pattern ¶ added in v1.9.0
func (rule PushDownWindowAggregateByTimeRule) Pattern() plan.Pattern
type PushDownWindowAggregateRule ¶ added in v1.9.0
type PushDownWindowAggregateRule struct{}
Push Down of window aggregates. ReadRangePhys |> window |> { min, max, mean, count, sum }
func (PushDownWindowAggregateRule) Name ¶ added in v1.9.0
func (PushDownWindowAggregateRule) Name() string
func (PushDownWindowAggregateRule) Pattern ¶ added in v1.9.0
func (rule PushDownWindowAggregateRule) Pattern() plan.Pattern
type ReadFilterSpec ¶ added in v1.7.8
type ReadGroupPhysSpec ¶ added in v1.7.8
type ReadGroupPhysSpec struct { plan.DefaultCost ReadRangePhysSpec GroupMode flux.GroupMode GroupKeys []string AggregateMethod string }
func (*ReadGroupPhysSpec) Copy ¶ added in v1.7.8
func (s *ReadGroupPhysSpec) Copy() plan.ProcedureSpec
func (*ReadGroupPhysSpec) Kind ¶ added in v1.7.8
func (s *ReadGroupPhysSpec) Kind() plan.ProcedureKind
type ReadGroupSpec ¶ added in v1.7.8
type ReadGroupSpec struct { ReadFilterSpec GroupMode GroupMode GroupKeys []string AggregateMethod string }
type ReadRangePhysSpec ¶ added in v1.7.8
type ReadRangePhysSpec struct { plan.DefaultCost Bucket string BucketID string // Predicate is the filtering predicate for calling into storage. // It must not be mutated. Predicate *datatypes.Predicate Bounds flux.Bounds }
func (*ReadRangePhysSpec) Copy ¶ added in v1.7.8
func (s *ReadRangePhysSpec) Copy() plan.ProcedureSpec
func (*ReadRangePhysSpec) Kind ¶ added in v1.7.8
func (s *ReadRangePhysSpec) Kind() plan.ProcedureKind
func (*ReadRangePhysSpec) LookupDatabase ¶ added in v1.7.8
func (s *ReadRangePhysSpec) LookupDatabase(_ context.Context, deps StorageDependencies, a execute.Administration) (string, string, error)
func (*ReadRangePhysSpec) TimeBounds ¶ added in v1.7.8
func (s *ReadRangePhysSpec) TimeBounds(predecessorBounds *plan.Bounds) *plan.Bounds
TimeBounds implements plan.BoundsAwareProcedureSpec.
type ReadTagKeysPhysSpec ¶ added in v1.7.8
type ReadTagKeysPhysSpec struct {
ReadRangePhysSpec
}
func (*ReadTagKeysPhysSpec) Copy ¶ added in v1.7.8
func (s *ReadTagKeysPhysSpec) Copy() plan.ProcedureSpec
func (*ReadTagKeysPhysSpec) Kind ¶ added in v1.7.8
func (s *ReadTagKeysPhysSpec) Kind() plan.ProcedureKind
type ReadTagKeysSpec ¶ added in v1.7.8
type ReadTagKeysSpec struct {
ReadFilterSpec
}
type ReadTagValuesPhysSpec ¶ added in v1.7.8
type ReadTagValuesPhysSpec struct { ReadRangePhysSpec TagKey string }
func (*ReadTagValuesPhysSpec) Copy ¶ added in v1.7.8
func (s *ReadTagValuesPhysSpec) Copy() plan.ProcedureSpec
func (*ReadTagValuesPhysSpec) Kind ¶ added in v1.7.8
func (s *ReadTagValuesPhysSpec) Kind() plan.ProcedureKind
type ReadTagValuesSpec ¶ added in v1.7.8
type ReadTagValuesSpec struct { ReadFilterSpec TagKey string }
type ReadWindowAggregatePhysSpec ¶ added in v1.9.0
type ReadWindowAggregatePhysSpec struct { plan.DefaultCost ReadRangePhysSpec WindowEvery flux.Duration Offset flux.Duration Aggregates []plan.ProcedureKind CreateEmpty bool TimeColumn string }
func (*ReadWindowAggregatePhysSpec) Copy ¶ added in v1.9.0
func (s *ReadWindowAggregatePhysSpec) Copy() plan.ProcedureSpec
func (*ReadWindowAggregatePhysSpec) Kind ¶ added in v1.9.0
func (s *ReadWindowAggregatePhysSpec) Kind() plan.ProcedureKind
func (*ReadWindowAggregatePhysSpec) PlanDetails ¶ added in v1.9.0
func (s *ReadWindowAggregatePhysSpec) PlanDetails() string
type ReadWindowAggregateSpec ¶ added in v1.9.0
type ReadWindowAggregateSpec struct { ReadFilterSpec WindowEvery int64 Offset int64 Aggregates []plan.ProcedureKind CreateEmpty bool TimeColumn string Window execute.Window }
Window and the WindowEvery/Offset should be mutually exclusive. If you set either the WindowEvery or Offset with nanosecond values, then the Window will be ignored
func (*ReadWindowAggregateSpec) Name ¶ added in v1.9.0
func (spec *ReadWindowAggregateSpec) Name() string
type Reader ¶
type Reader interface { ReadFilter(ctx context.Context, spec ReadFilterSpec, alloc memory.Allocator) (TableIterator, error) ReadGroup(ctx context.Context, spec ReadGroupSpec, alloc memory.Allocator) (TableIterator, error) ReadWindowAggregate(ctx context.Context, spec ReadWindowAggregateSpec, alloc memory.Allocator) (TableIterator, error) ReadTagKeys(ctx context.Context, spec ReadTagKeysSpec, alloc memory.Allocator) (TableIterator, error) ReadTagValues(ctx context.Context, spec ReadTagValuesSpec, alloc memory.Allocator) (TableIterator, error) Close() }
type SortedPivotRule ¶ added in v1.8.0
type SortedPivotRule struct{}
SortedPivotRule is a rule that optimizes a pivot when it is directly after an influxdb from.
func (SortedPivotRule) Name ¶ added in v1.8.0
func (SortedPivotRule) Name() string
func (SortedPivotRule) Pattern ¶ added in v1.8.0
func (SortedPivotRule) Pattern() plan.Pattern
type Source ¶ added in v1.7.8
type Source struct {
// contains filtered or unexported fields
}
func (*Source) AddTransformation ¶ added in v1.7.8
func (s *Source) AddTransformation(t execute.Transformation)
type StorageDependencies ¶ added in v1.7.9
type StorageDependencies struct { Reader Reader MetaClient MetaClient Authorizer Authorizer AuthEnabled bool PointsWriter PointsWriter }
func GetStorageDependencies ¶ added in v1.7.9
func GetStorageDependencies(ctx context.Context) StorageDependencies
func (StorageDependencies) Inject ¶ added in v1.7.9
func (d StorageDependencies) Inject(ctx context.Context) context.Context
func (StorageDependencies) Validate ¶ added in v1.7.9
func (d StorageDependencies) Validate() error
type TableIterator ¶ added in v1.7.8
type TableIterator interface { flux.TableIterator Statistics() cursors.CursorStats }
TableIterator is a table iterator that also keeps track of cursor statistics from the storage engine.
type ToOpSpec ¶ added in v1.9.0
type ToOpSpec struct { Bucket string `json:"bucket"` TimeColumn string `json:"timeColumn"` MeasurementColumn string `json:"measurementColumn"` TagColumns []string `json:"tagColumns"` FieldFn interpreter.ResolvedFunction `json:"fieldFn"` }
ToOpSpec is the flux.OperationSpec for the `to` flux function.
func (ToOpSpec) Kind ¶ added in v1.9.0
func (ToOpSpec) Kind() flux.OperationKind
type ToProcedureSpec ¶ added in v1.9.0
type ToProcedureSpec struct { plan.DefaultCost Spec *ToOpSpec }
ToProcedureSpec is the procedure spec for the `to` flux function.
func (*ToProcedureSpec) Copy ¶ added in v1.9.0
func (o *ToProcedureSpec) Copy() plan.ProcedureSpec
Copy clones the procedure spec for `to` flux function.
func (*ToProcedureSpec) Kind ¶ added in v1.9.0
func (o *ToProcedureSpec) Kind() plan.ProcedureKind
Kind returns the kind for the procedure spec for the `to` flux function.
type ToTransformation ¶ added in v1.9.0
type ToTransformation struct { execute.ExecutionNode Ctx context.Context DB string RP string // contains filtered or unexported fields }
func NewToTransformation ¶ added in v1.9.0
func NewToTransformation(ctx context.Context, d execute.Dataset, cache execute.TableBuilderCache, toSpec *ToProcedureSpec, deps StorageDependencies) (*ToTransformation, error)
func (*ToTransformation) Finish ¶ added in v1.9.0
func (t *ToTransformation) Finish(id execute.DatasetID, err error)
Finish is called after the `to` flux function's transformation is done processing.
func (*ToTransformation) Process ¶ added in v1.9.0
Process does the actual work for the ToTransformation.
func (*ToTransformation) RetractTable ¶ added in v1.9.0
func (*ToTransformation) UpdateProcessingTime ¶ added in v1.9.0
UpdateProcessingTime updates the processing time for the transformation for the `to` flux function.
func (*ToTransformation) UpdateWatermark ¶ added in v1.9.0
UpdateWatermark updates the watermark for the transformation for the `to` flux function.