Finalize also just returns the string so is the same as MinSerialize.
| 135 | |
| 136 | // Finalize also just returns the string so is the same as MinSerialize. |
| 137 | StringVal MinFinalize(FunctionContext* context, const BufferVal& val) { |
| 138 | const MinState* state = reinterpret_cast<const MinState*>(val); |
| 139 | if (state->value == NULL) return StringVal::null(); |
| 140 | StringVal result = StringVal::CopyFrom(context, state->value, state->len); |
| 141 | context->Free(state->value); |
| 142 | return result; |
| 143 | } |
| 144 | |
| 145 | //----------------------------- Bits after Xor ------------------------------------ |
| 146 | // Example of a UDA that xors all the input bits and then returns the number of |