variance-uda.cc
// A serialize function is necessary to free the intermediate state allocation.
A serialize function is necessary to free the intermediate state allocation.
A serialize function is necessary to free the intermediate state allocation .
StringVal VarianceSerialize(FunctionContext* ctx, const StringVal& src) {
  if (src.is_null) return StringVal::null();
  StringVal result(ctx, src.len);
  memcpy(result.ptr, src.ptr, src.len);
  ctx->Free(src.ptr);
  return result;
}
StringVal VarianceSerialize ( FunctionContext * ctx , const StringVal & src ) { if ( src . is_null ) return StringVal :: null ( ) ; StringVal result ( ctx , src . len ) ; memcpy ( result . ptr , src . ptr , src . len ) ; ctx -> Free ( src . ptr ) ; return result ; }
A serialize function is necessary to free the intermediate state allocation.
A serialize function is necessary to free the intermediate state allocation .