| 3599 | |
| 3600 | template <typename T> |
| 3601 | void AggregateFunctions::FirstValUpdate(FunctionContext* ctx, const T& src, T* dst) { |
| 3602 | // The first call to FirstValUpdate sets the value of dst. |
| 3603 | if (ctx->impl()->num_updates() > 1) return; |
| 3604 | // num_updates is incremented before calling Update(), so it should never be 0. |
| 3605 | // Remove() should never be called for FIRST_VALUE. |
| 3606 | DCHECK_GT(ctx->impl()->num_updates(), 0); |
| 3607 | DCHECK_EQ(ctx->impl()->num_removes(), 0); |
| 3608 | *dst = src; |
| 3609 | } |
| 3610 | |
| 3611 | template <> |
| 3612 | void AggregateFunctions::FirstValUpdate(FunctionContext* ctx, const StringVal& src, |
nothing calls this directly
no test coverage detected