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.
()
| 33 | // format to AQLQueryResult nested result format. It also translates enum |
| 34 | // values back to their string representations. |
| 35 | func (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 | |
| 54 | func (qc *AQLQueryContext) initResultFlushContext() { |
| 55 | qc.resultFlushContext.dimensionValueCache = make([]map[queryCom.TimeDimensionMeta]map[int64]string, len(qc.OOPK.Dimensions)) |
no test coverage detected