MCPcopy Index your code
hub / github.com/uber/aresdb / cleanupBeforeAggregation

Method cleanupBeforeAggregation

query/aql_processor.go:687–706  ·  view source on GitHub ↗

clean up memory not used in final aggregation (sort, reduce, hll) before aggregation happen

()

Source from the content-addressed store, hash-verified

685// clean up memory not used in final aggregation (sort, reduce, hll)
686// before aggregation happen
687func (bc *oopkBatchContext) cleanupBeforeAggregation() {
688 for _, column := range bc.columns {
689 deviceFreeAndSetNil(&column.basePtr)
690 }
691 bc.columns = nil
692
693 deviceFreeAndSetNil(&bc.indexVectorD)
694 deviceFreeAndSetNil(&bc.predicateVectorD)
695 deviceFreeAndSetNil(&bc.geoPredicateVectorD)
696
697 for _, recordIDsVector := range bc.foreignTableRecordIDsD {
698 deviceFreeAndSetNil(&recordIDsVector)
699 }
700 bc.foreignTableRecordIDsD = nil
701
702 for _, stackFrame := range bc.exprStackD {
703 deviceFreeAndSetNil(&stackFrame[0])
704 }
705 bc.exprStackD = nil
706}
707
708// swapResultBufferForNextBatch swaps the two
709// sets of dim/measure/hash vectors to get ready for the next batch.

Callers 4

projectMethod · 0.80
ReleaseMethod · 0.80
projectMethod · 0.80

Calls 1

deviceFreeAndSetNilFunction · 0.85

Tested by

no test coverage detected