MCPcopy
hub / github.com/uber/aresdb / Postprocess

Method Postprocess

query/aql_postprocessor.go:35–52  ·  view source on GitHub ↗

Postprocess converts the internal dimension and measure vector in binary format to AQLQueryResult nested result format. It also translates enum values back to their string representations.

()

Source from the content-addressed store, hash-verified

33// format to AQLQueryResult nested result format. It also translates enum
34// values back to their string representations.
35func (qc *AQLQueryContext) Postprocess() {
36 oopkContext := qc.OOPK
37 if oopkContext.IsHLL() {
38 // skip translate enum for HLL if query is from broker
39 result, err := queryCom.NewTimeSeriesHLLResult(qc.HLLQueryResult, queryCom.HLLDataHeader, qc.DataOnly)
40 if err != nil {
41 // should never be here except bug
42 qc.Error = utils.StackError(err, "failed to read hll result")
43 return
44 }
45 qc.Results = queryCom.ComputeHLLResult(result)
46 return
47 }
48
49 if !qc.IsNonAggregationQuery {
50 qc.flushResultBuffer()
51 }
52}
53
54func (qc *AQLQueryContext) initResultFlushContext() {
55 qc.resultFlushContext.dimensionValueCache = make([]map[queryCom.TimeDimensionMeta]map[int64]string, len(qc.OOPK.Dimensions))

Callers 3

ReportResultMethod · 0.80

Calls 3

flushResultBufferMethod · 0.95
StackErrorFunction · 0.92
IsHLLMethod · 0.80

Tested by

no test coverage detected