Documentation ¶
Overview ¶
Package measure implements execution operations for querying measure data.
Package measure implements execution operations for querying measure data.
Package measure implements execution operations for querying measure data.
Index ¶
- func Analyze(_ context.Context, criteria *measurev1.QueryRequest, ...) (logical.Plan, error)
- func BuildSchema(md *databasev1.Measure, indexRules []*databasev1.IndexRule) (logical.Schema, error)
- func BuildTopNSchema(md *databasev1.Measure) (logical.Schema, error)
- func DistributedAnalyze(criteria *measurev1.QueryRequest, s logical.Schema) (logical.Plan, error)
- func TopNAnalyze(_ context.Context, criteria *measurev1.TopNRequest, schema *databasev1.Measure, ...) (logical.Plan, error)
- type TopElement
- type TopQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Analyze ¶ added in v0.3.0
func Analyze(_ context.Context, criteria *measurev1.QueryRequest, metadata *commonv1.Metadata, s logical.Schema) (logical.Plan, error)
Analyze converts logical expressions to executable operation tree represented by Plan.
func BuildSchema ¶ added in v0.3.0
func BuildSchema(md *databasev1.Measure, indexRules []*databasev1.IndexRule) (logical.Schema, error)
BuildSchema returns Schema loaded from the metadata repository.
func BuildTopNSchema ¶ added in v0.6.0
func BuildTopNSchema(md *databasev1.Measure) (logical.Schema, error)
BuildTopNSchema returns Schema loaded from the metadata repository.
func DistributedAnalyze ¶ added in v0.5.0
DistributedAnalyze converts logical expressions to executable operation tree represented by Plan.
func TopNAnalyze ¶ added in v0.6.0
func TopNAnalyze(_ context.Context, criteria *measurev1.TopNRequest, schema *databasev1.Measure, sourceMeasureSchema *databasev1.Measure, s logical.Schema, ) (logical.Plan, error)
TopNAnalyze converts logical expressions to executable operation tree represented by Plan.
Types ¶
type TopElement ¶
type TopElement struct {
// contains filtered or unexported fields
}
TopElement seals a sortable value and its data point which this value belongs to.
func NewTopElement ¶
func NewTopElement(dp *measurev1.DataPoint, value int64) TopElement
NewTopElement returns a TopElement.
type TopQueue ¶
type TopQueue struct {
// contains filtered or unexported fields
}
TopQueue is a sortable queue only keeps top-n members when pushed new elements.
func NewTopQueue ¶
NewTopQueue returns a new TopQueue.
func (*TopQueue) Elements ¶
func (s *TopQueue) Elements() []TopElement
Elements returns all elements accepted by the queue.
func (*TopQueue) Equal ¶
Equal reports whether s and other have the queue's max acceptable number and sorting order.
func (*TopQueue) Insert ¶
func (s *TopQueue) Insert(element TopElement) bool
Insert pushes a new element to the queue. It returns true if the element are accepted by the queue, returns false if it's evicted.