Documentation ¶
Index ¶
- func AddAggAvgToTimechartRunningStats(m *structs.MeasureAggregator, ...)
- func AddAggCountToTimechartRunningStats(m *structs.MeasureAggregator, ...)
- func AddMeasureAggInRunningStatsForCount(m *structs.MeasureAggregator, ...) (int, error)
- func AddMeasureAggInRunningStatsForRange(m *structs.MeasureAggregator, ...) (int, error)
- func AddMeasureAggInRunningStatsForValuesOrCardinality(m *structs.MeasureAggregator, ...) (int, error)
- func CheckGroupByColValsAgainstLimit(timechart *structs.TimechartExpr, groupByColValCnt map[string]int, ...) map[string]bool
- func ComputeAggEvalForAvg(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForCardinality(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForCount(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForList(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForMinOrMax(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForRange(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForSum(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func ComputeAggEvalForValues(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, ...) error
- func CreateCValueFromColValue(colValue interface{}) utils.CValueEnclosure
- func CreateCValueFromValueExpression(measureAgg *structs.MeasureAggregator, ...) (utils.CValueEnclosure, bool)
- func DetermineAggColUsage(measureAgg *structs.MeasureAggregator, aggCols map[string]bool, ...)
- func FindTimeRangeBucket(timePoints []uint64, timestamp uint64, intervalMillis uint64) uint64
- func GenerateTimeRangeBuckets(timeHistogram *structs.TimeBucket) []uint64
- func GetBucketKey(record map[string]interface{}, groupByRequest *structs.GroupByRequest) (string, error)
- func GetFloatValueAfterEvaluation(measureAgg *structs.MeasureAggregator, ...) (float64, string, bool, error)
- func GetIntervalInMillis(num int, timeUnit utils.TimeUnit) uint64
- func GetNoWindowMinMax(e1 utils.CValueEnclosure, e2 utils.CValueEnclosure, isMin bool) (utils.CValueEnclosure, error)
- func GetOrderedRecs(recs map[string]map[string]interface{}, recordIndexInFinal map[string]int) ([]string, error)
- func InitGenEvent(aggs *structs.QueryAggregators)
- func InitRangeStat() *structs.RangeStat
- func InitRunningStreamStatsResults(measureFunc utils.AggregateFunctions) *structs.RunningStreamStatsResults
- func InitTimeBucket(num int, timeUnit utils.TimeUnit, byField string, limitExpr *structs.LimitExpr, ...) *structs.TimeBucket
- func InitialScoreMap(timechart *structs.TimechartExpr, groupByColValCnt map[string]int) map[string]*utils.CValueEnclosure
- func IsOtherCol(valIsInLimit map[string]bool, groupByColVal string) bool
- func IsRankBySum(timechart *structs.TimechartExpr) bool
- func MergeMap(groupByColValCnt map[string]int, toMerge map[string]int)
- func MergeVal(eVal *utils.CValueEnclosure, eValToMerge utils.CValueEnclosure, ...)
- func PerformAggEvalForCardinality(measureAgg *structs.MeasureAggregator, strSet map[string]struct{}, ...) (float64, error)
- func PerformAggEvalForList(measureAgg *structs.MeasureAggregator, currentList []string, ...) ([]string, error)
- func PerformEvalAggForAvg(measureAgg *structs.MeasureAggregator, count uint64, currResultExists bool, ...) (structs.AvgStat, error)
- func PerformEvalAggForCount(measureAgg *structs.MeasureAggregator, count uint64, currResultExists bool, ...) (utils.CValueEnclosure, error)
- func PerformEvalAggForMinOrMax(measureAgg *structs.MeasureAggregator, currResultExists bool, ...) (utils.CValueEnclosure, error)
- func PerformEvalAggForRange(measureAgg *structs.MeasureAggregator, currResultExists bool, ...) (structs.RangeStat, error)
- func PerformEvalAggForSum(measureAgg *structs.MeasureAggregator, count uint64, currResultExists bool, ...) (utils.CValueEnclosure, error)
- func PerformGenTimes(aggs *structs.QueryAggregators) error
- func PerformInputLookup(aggs *structs.QueryAggregators) error
- func PerformNoWindowStreamStatsOnSingleFunc(ssOption *structs.StreamStatsOptions, ...) (utils.CValueEnclosure, bool, error)
- func PerformStreamStatOnSingleRecord(nodeResult *structs.NodeResult, agg *structs.QueryAggregators, currIndex int, ...) (int, uint64, string, error)
- func PerformStreamStats(nodeResult *structs.NodeResult, agg *structs.QueryAggregators, ...) error
- func PerformStreamStatsOnRawRecord(nodeResult *structs.NodeResult, agg *structs.QueryAggregators, ...) error
- func PerformStreamStatsOnSingleFunc(currIndex int, bucketKey string, ssOption *structs.StreamStatsOptions, ...) (utils.CValueEnclosure, bool, error)
- func PerformWindowStreamStatsOnSingleFunc(currIndex int, ssOption *structs.StreamStatsOptions, ...) (utils.CValueEnclosure, bool, error)
- func PopulateFieldToValueFromSegStats(fields []string, measureAgg *structs.MeasureAggregator, ...) error
- func PopulateGeneratedRecords(genEvent *structs.GenerateEvent, recs map[string]map[string]interface{}, ...) error
- func PostQueryBucketCleaning(nodeResult *structs.NodeResult, post *structs.QueryAggregators, ...) *structs.NodeResult
- func SetGeneratedCols(genEvent *structs.GenerateEvent, genCols []string)
- func SetupMeasureAgg(measureAgg *structs.MeasureAggregator, ...) (int, error)
- func ShouldAddRes(timechart *structs.TimechartExpr, tmLimitResult *structs.TMLimitResult, ...) bool
- func SortTimechartRes(timechart *structs.TimechartExpr, results *[]*structs.BucketResult)
- func UpdateRangeStat(floatValue float64, rangeStat *structs.RangeStat)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAggAvgToTimechartRunningStats ¶
func AddAggAvgToTimechartRunningStats(m *structs.MeasureAggregator, allConvertedMeasureOps *[]*structs.MeasureAggregator, allReverseIndex *[]int, colToIdx map[string][]int, idx int)
func AddAggCountToTimechartRunningStats ¶
func AddAggCountToTimechartRunningStats(m *structs.MeasureAggregator, allConvertedMeasureOps *[]*structs.MeasureAggregator, allReverseIndex *[]int, colToIdx map[string][]int, idx int)
func AddMeasureAggInRunningStatsForCount ¶
func AddMeasureAggInRunningStatsForCount(m *structs.MeasureAggregator, allConvertedMeasureOps *[]*structs.MeasureAggregator, allReverseIndex *[]int, colToIdx map[string][]int, idx int) (int, error)
func AddMeasureAggInRunningStatsForRange ¶
func AddMeasureAggInRunningStatsForRange(m *structs.MeasureAggregator, allConvertedMeasureOps *[]*structs.MeasureAggregator, allReverseIndex *[]int, colToIdx map[string][]int, idx int) (int, error)
Record the index of range() in runningStats; the index is idx To calculate the range(), we need both the min() and max(), which require two columns to store them Since it is the runningStats not the stats for results, we can use one extra col to store the min/max idx stores the result of min, and idx+1 stores the result of max.
func AddMeasureAggInRunningStatsForValuesOrCardinality ¶
func AddMeasureAggInRunningStatsForValuesOrCardinality(m *structs.MeasureAggregator, allConvertedMeasureOps *[]*structs.MeasureAggregator, allReverseIndex *[]int, colToIdx map[string][]int, idx int) (int, error)
func CheckGroupByColValsAgainstLimit ¶
func CheckGroupByColValsAgainstLimit(timechart *structs.TimechartExpr, groupByColValCnt map[string]int, groupValScoreMap map[string]*utils.CValueEnclosure, measureOperations []*structs.MeasureAggregator) map[string]bool
Timechart will only display N highest/lowest scoring distinct values of the split-by field For Single agg, the score is based on the sum of the values in the aggregation. Therefore, we can only know groupByColVal's ranking after processing all the runningStats For multiple aggs, the score is based on the freq of the field. Which means we can rank groupByColVal at this time.
func ComputeAggEvalForAvg ¶
func ComputeAggEvalForAvg(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure, runningEvalStats map[string]interface{}) error
func ComputeAggEvalForCardinality ¶
func ComputeAggEvalForCardinality(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure, runningEvalStats map[string]interface{}) error
func ComputeAggEvalForCount ¶
func ComputeAggEvalForCount(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure) error
func ComputeAggEvalForList ¶
func ComputeAggEvalForList(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure, runningEvalStats map[string]interface{}) error
func ComputeAggEvalForMinOrMax ¶
func ComputeAggEvalForMinOrMax(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure, isMin bool) error
func ComputeAggEvalForRange ¶
func ComputeAggEvalForRange(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure, runningEvalStats map[string]interface{}) error
func ComputeAggEvalForSum ¶
func ComputeAggEvalForSum(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure) error
func ComputeAggEvalForValues ¶
func ComputeAggEvalForValues(measureAgg *structs.MeasureAggregator, sstMap map[string]*structs.SegStats, measureResults map[string]utils.CValueEnclosure, runningEvalStats map[string]interface{}) error
func CreateCValueFromColValue ¶
func CreateCValueFromColValue(colValue interface{}) utils.CValueEnclosure
func CreateCValueFromValueExpression ¶
func CreateCValueFromValueExpression(measureAgg *structs.MeasureAggregator, fieldToValue map[string]utils.CValueEnclosure, colValue utils.CValueEnclosure) (utils.CValueEnclosure, bool)
func DetermineAggColUsage ¶
func DetermineAggColUsage(measureAgg *structs.MeasureAggregator, aggCols map[string]bool, aggColUsage map[string]utils.AggColUsageMode, valuesUsage map[string]bool, listUsage map[string]bool)
Determine if cols used by eval statements or not
func FindTimeRangeBucket ¶
Find correct time range bucket for timestamp
func GenerateTimeRangeBuckets ¶
func GenerateTimeRangeBuckets(timeHistogram *structs.TimeBucket) []uint64
func GetBucketKey ¶
func GetBucketKey(record map[string]interface{}, groupByRequest *structs.GroupByRequest) (string, error)
func GetFloatValueAfterEvaluation ¶
func GetFloatValueAfterEvaluation(measureAgg *structs.MeasureAggregator, fieldToValue map[string]utils.CValueEnclosure) (float64, string, bool, error)
func GetNoWindowMinMax ¶
func GetNoWindowMinMax(e1 utils.CValueEnclosure, e2 utils.CValueEnclosure, isMin bool) (utils.CValueEnclosure, error)
Incoming value e2 has to have float or string dtype
func GetOrderedRecs ¶
func InitGenEvent ¶
func InitGenEvent(aggs *structs.QueryAggregators)
func InitRangeStat ¶
func InitRunningStreamStatsResults ¶
func InitRunningStreamStatsResults(measureFunc utils.AggregateFunctions) *structs.RunningStreamStatsResults
func InitTimeBucket ¶
func InitialScoreMap ¶
func InitialScoreMap(timechart *structs.TimechartExpr, groupByColValCnt map[string]int) map[string]*utils.CValueEnclosure
Initial score map for single agg: the score is based on the sum of the values in the aggregation
func IsRankBySum ¶
func IsRankBySum(timechart *structs.TimechartExpr) bool
func MergeVal ¶
func MergeVal(eVal *utils.CValueEnclosure, eValToMerge utils.CValueEnclosure, hll *putils.GobbableHll, hllToMerge *putils.GobbableHll, strSet map[string]struct{}, strSetToMerge map[string]struct{}, aggFunc utils.AggregateFunctions, useAdditionForMerge bool)
For numeric agg(not include dc), we can simply use addition to merge them For string values, it depends on the aggregation function
func PerformAggEvalForCardinality ¶
func PerformAggEvalForCardinality(measureAgg *structs.MeasureAggregator, strSet map[string]struct{}, fieldToValue map[string]utils.CValueEnclosure) (float64, error)
Always pass a non-nil strSet when using this function
func PerformAggEvalForList ¶
func PerformAggEvalForList(measureAgg *structs.MeasureAggregator, currentList []string, fieldToValue map[string]utils.CValueEnclosure) ([]string, error)
func PerformEvalAggForAvg ¶
func PerformEvalAggForCount ¶
func PerformEvalAggForCount(measureAgg *structs.MeasureAggregator, count uint64, currResultExists bool, currResult utils.CValueEnclosure, fieldToValue map[string]utils.CValueEnclosure) (utils.CValueEnclosure, error)
func PerformEvalAggForMinOrMax ¶
func PerformEvalAggForMinOrMax(measureAgg *structs.MeasureAggregator, currResultExists bool, currResult utils.CValueEnclosure, fieldToValue map[string]utils.CValueEnclosure, isMin bool) (utils.CValueEnclosure, error)
func PerformEvalAggForRange ¶
func PerformEvalAggForSum ¶
func PerformEvalAggForSum(measureAgg *structs.MeasureAggregator, count uint64, currResultExists bool, currResult utils.CValueEnclosure, fieldToValue map[string]utils.CValueEnclosure) (utils.CValueEnclosure, error)
func PerformGenTimes ¶
func PerformGenTimes(aggs *structs.QueryAggregators) error
func PerformInputLookup ¶
func PerformInputLookup(aggs *structs.QueryAggregators) error
func PerformNoWindowStreamStatsOnSingleFunc ¶
func PerformNoWindowStreamStatsOnSingleFunc(ssOption *structs.StreamStatsOptions, ssResults *structs.RunningStreamStatsResults, measureAgg *structs.MeasureAggregator, colValue utils.CValueEnclosure, include bool) (utils.CValueEnclosure, bool, error)
func PerformStreamStatOnSingleRecord ¶
func PerformStreamStatOnSingleRecord(nodeResult *structs.NodeResult, agg *structs.QueryAggregators, currIndex int, currentBucketKey string, record map[string]interface{}, measureAggs []*structs.MeasureAggregator, numPrevSegmentProcessedRecords uint64, timeInMilli uint64, timeSort bool, timeSortAsc bool) (int, uint64, string, error)
func PerformStreamStats ¶
func PerformStreamStatsOnSingleFunc ¶
func PerformStreamStatsOnSingleFunc(currIndex int, bucketKey string, ssOption *structs.StreamStatsOptions, measureFuncIndex int, measureAgg *structs.MeasureAggregator, record map[string]interface{}, timestamp uint64, timeSortAsc bool) (utils.CValueEnclosure, bool, error)
func PerformWindowStreamStatsOnSingleFunc ¶
func PerformWindowStreamStatsOnSingleFunc(currIndex int, ssOption *structs.StreamStatsOptions, ssResults *structs.RunningStreamStatsResults, windowSize int, measureAgg *structs.MeasureAggregator, colValue utils.CValueEnclosure, timestamp uint64, timeSortAsc bool, include bool) (utils.CValueEnclosure, bool, error)
func PostQueryBucketCleaning ¶
func PostQueryBucketCleaning(nodeResult *structs.NodeResult, post *structs.QueryAggregators, recs map[string]map[string]interface{}, recordIndexInFinal map[string]int, finalCols map[string]bool, numTotalSegments uint64, finishesSegment bool) *structs.NodeResult
Function to clean up results based on input query aggregations. This will make sure all buckets respect the minCount & is returned in a sorted order
func SetGeneratedCols ¶
func SetGeneratedCols(genEvent *structs.GenerateEvent, genCols []string)
func SetupMeasureAgg ¶
func SetupMeasureAgg(measureAgg *structs.MeasureAggregator, allConvertedMeasureOps *[]*structs.MeasureAggregator, measureFunc utils.AggregateFunctions, allReverseIndex *[]int, colToIdx map[string][]int, idx int) (int, error)
func ShouldAddRes ¶
func ShouldAddRes(timechart *structs.TimechartExpr, tmLimitResult *structs.TMLimitResult, index int, eVal utils.CValueEnclosure, hllToMerge *putils.GobbableHll, strSetToMerge map[string]struct{}, aggFunc utils.AggregateFunctions, groupByColVal string, isOtherCol bool) bool
func SortTimechartRes ¶
func SortTimechartRes(timechart *structs.TimechartExpr, results *[]*structs.BucketResult)
func UpdateRangeStat ¶
Types ¶
This section is empty.