code: func (af *avgFunction) GetStreamResult() (d types.Datum) {
  	if af.streamCtx == nil {
  		return
  	}
  	d = af.calculateResult(af.streamCtx)
  	af.streamCtx = nil
  	return
  }
docs: // GetStreamResult implements AggregationFunction interface.