| 322 | } |
| 323 | |
| 324 | int GroupingAggregator::CopyGroupingValuesStringSlot(Tuple* intermediate_tuple, |
| 325 | int idx, int tuple_offset, uint8_t* buffer) noexcept { |
| 326 | if (ht_ctx_->ExprValueNull(idx)) return 0; |
| 327 | |
| 328 | // ptr and len were already copied to the fixed-len part of string value |
| 329 | StringValue* sv = reinterpret_cast<StringValue*>( |
| 330 | intermediate_tuple->GetSlot(tuple_offset)); |
| 331 | if (sv->IsSmall()) return 0; |
| 332 | memcpy(buffer, sv->Ptr(), sv->Len()); |
| 333 | sv->SetPtr(reinterpret_cast<char*>(buffer)); |
| 334 | return sv->Len(); |
| 335 | } |
| 336 | |
| 337 | // Instantiate required templates. |
| 338 | template Status GroupingAggregator::AddBatchImpl<false>( |