Documentation
¶
Overview ¶
Package executor defines the specifications accessing underlying data repositories.
Index ¶
- func WithDistributedExecutionContext(ctx context.Context, ec DistributedExecutionContext) context.Context
- type DistributedExecutionContext
- type DistributedExecutionContextKey
- type MIterator
- type MeasureExecutable
- type MeasureExecutionContext
- type StreamExecutable
- type StreamExecutionContext
- type StreamVecExecutable
- type StreamVecScanSource
- type TraceExecutable
- type TraceExecutionContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDistributedExecutionContext ¶ added in v0.5.0
func WithDistributedExecutionContext(ctx context.Context, ec DistributedExecutionContext) context.Context
WithDistributedExecutionContext returns a new context with distributed execution context.
Types ¶
type DistributedExecutionContext ¶ added in v0.5.0
type DistributedExecutionContext interface {
bus.Broadcaster
TimeRange() *modelv1.TimeRange
NodeSelectors() map[string][]string
}
DistributedExecutionContext allows retrieving data through the distributed module.
func FromDistributedExecutionContext ¶ added in v0.5.0
func FromDistributedExecutionContext(ctx context.Context) DistributedExecutionContext
FromDistributedExecutionContext returns the distributed execution context from context.Context.
type DistributedExecutionContextKey ¶ added in v0.5.0
type DistributedExecutionContextKey struct{}
DistributedExecutionContextKey is the key of distributed execution context in context.Context.
type MIterator ¶
type MIterator interface {
Next() bool
Current() []*measurev1.InternalDataPoint
Close() error
}
MIterator allows iterating in a measure data set.
type MeasureExecutable ¶
MeasureExecutable allows querying in the measure schema.
type MeasureExecutionContext ¶
type MeasureExecutionContext interface {
Query(ctx context.Context, opts model.MeasureQueryOptions) (model.MeasureQueryResult, error)
}
MeasureExecutionContext allows retrieving data through the measure module.
type StreamExecutable ¶
StreamExecutable allows querying in the stream schema.
type StreamExecutionContext ¶
type StreamExecutionContext interface {
Query(ctx context.Context, opts model.StreamQueryOptions) (model.StreamQueryResult, error)
QueryVectorized(ctx context.Context, opts model.StreamQueryOptions) (StreamVecScanSource, error)
VectorizedConfig() vstream.VectorizedConfig
}
StreamExecutionContext allows retrieving data through the stream module.
QueryVectorized and VectorizedConfig are the vec-path additions: the former yields a pull-based columnar scan source (the M3 vecScanSource), the latter surfaces the engine-side --stream-vectorized-* configuration so the vec dispatch can decide whether the flag is on.
type StreamVecExecutable ¶ added in v0.11.0
type StreamVecExecutable interface {
ExecuteVectorized(ctx context.Context) ([]*vectorized.RecordBatch, *vectorized.BatchSchema, error)
// ProjectionTags returns the projected tag families/names in projection order,
// so the egress builds the same tag families/tags the row path would.
ProjectionTags() []model.TagProjection
}
StreamVecExecutable is the optional capability a stream plan node exposes when it can be executed through the native columnar (vectorized) path. The data-node processor type-asserts the analyzed plan to this interface; a plan shape that cannot be vectorized (multi-group merge, skipping filter, tag filter, etc.) simply does not implement it, so the assertion fails and the row path runs.
ExecuteVectorized returns the fully merged/deduped/limited columnar batches (the M4 pipeline already applied) plus the batch schema, so both the standalone egress and the data-node frame emit consume a single columnar result.
type StreamVecScanSource ¶ added in v0.11.0
type StreamVecScanSource interface {
NextBatch(ctx context.Context) (*vectorized.RecordBatch, error)
// Schema returns the batch schema the source stamps on every batch it emits.
// The M4 SortedMerge validates batch.Schema by pointer identity, so the merge
// pipeline MUST be built with this exact schema, not a freshly-built one.
Schema() *vectorized.BatchSchema
Release()
}
StreamVecScanSource is the pull contract the vec scan source exposes: one columnar batch per NextBatch, (nil, nil) at exhaustion, Release to free resources. It mirrors banyand/stream's vecScanSource without importing it, so the executor package stays free of a data-node dependency cycle.
type TraceExecutable ¶ added in v0.9.0
type TraceExecutable interface {
Execute(context.Context) (iter.Iterator[model.TraceResult], error)
Close()
}
TraceExecutable allows querying in the trace schema.
type TraceExecutionContext ¶ added in v0.9.0
type TraceExecutionContext interface {
Query(ctx context.Context, opts model.TraceQueryOptions) (model.TraceQueryResult, error)
}
TraceExecutionContext allows retrieving data through the trace module.