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.
Package measure implements execution operations for querying measure data.
Index ¶
- func BuildSchema(md *databasev1.Measure, indexRules []*databasev1.IndexRule) (logical.Schema, error)
- func CompareTopNItems[K streaming.TopSortKey](aVal K, aKey string, bVal K, bKey string, sortDesc bool) int
- func ToInternalTopNResponse(idps []*measurev1.InternalDataPoint) *measurev1.InternalTopNResponse
- func TopNAnalyze(criteria *measurev1.TopNRequest, partialLimit int32, ...) (logical.Plan, error)
- func TopNItemKey(entity []*modelv1.Tag) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 CompareTopNItems ¶ added in v0.12.0
func CompareTopNItems[K streaming.TopSortKey](aVal K, aKey string, bVal K, bKey string, sortDesc bool) int
CompareTopNItems ranks two aggregated TopN items, given their aggregates and keys (see TopNItemKey): it returns a negative number when a ranks before b, a positive one when b ranks before a, and 0 when they are the same item. The better aggregate in the sort direction ranks first, and equal aggregates are ranked by the key, so that the items kept at a cutoff depend neither on the scan order nor on the order of the answers. The data nodes and the liaison rank with it, so that a data node's local cutoff agrees with the liaison's ranking.
func ToInternalTopNResponse ¶ added in v0.12.0
func ToInternalTopNResponse(idps []*measurev1.InternalDataPoint) *measurev1.InternalTopNResponse
ToInternalTopNResponse converts the elements of a partial answer into the response of a data node, one entry per shard, in the order the shards first appear. The items of a shard keep their order, best first. The liaison counts only the first entry of a shard, so the elements of a shard are grouped whatever their order.
func TopNAnalyze ¶ added in v0.6.0
func TopNAnalyze(criteria *measurev1.TopNRequest, partialLimit int32, sourceMeasureSchemaList []*databasev1.Measure, topNAggSchemaList []*databasev1.TopNAggregation, ecc []executor.MeasureExecutionContext, ) (logical.Plan, error)
TopNAnalyze converts logical expressions to executable operation tree represented by Plan. A positive partialLimit asks for the per-shard partial aggregates of a data node instead of final values, see topNAggregate; it only applies when the criteria carry an aggregation function.
func TopNItemKey ¶ added in v0.12.0
TopNItemKey returns the key that identifies a TopN item by its entity tags. The data nodes and the liaison key the items of an aggregated TopN query with it, so that they tell the same items apart.
Types ¶
This section is empty.