message: Issue Sorted Aggregate Slicing
  Slice in place.
diff: @@ -117,6 +117,30 @@ struct SortedAggregateState {
  }
  }
  + void UpdateSlice(SortedAggregateBindData &order_bind, DataChunk &sort_inputs, DataChunk &arg_inputs) {
  + // Lazy instantiation of the buffer chunks
  + InitializeBuffer(sort_buffer, order_bind.sort_types);
  + InitializeBuffer(arg_buffer, order_bind.arg_types);
  +
  + if (nsel + sort_buffer.size() > BUFFER_CAPACITY) {
  + Flush(order_bind);
  + }
  + if (ordering) {
  + sort_buffer.Reset();
  + sort_buffer.Slice(sort_inputs, sel, nsel);
  + ordering->Append(sort_buffer);
  +
  + arg_buffer.Reset();
  + arg_buffer.Slice(arg_inputs, sel, nsel);
  + arguments->Append(arg_buffer);
  + } else {
  + sort_buffer.Append(sort_inputs, true, &sel, nsel);
  + arg_buffer.Append(arg_inputs, true, &sel, nsel);
  + }
  +
  + nsel = 0;
  + }
  +
  void Combine(SortedAggregateBindData &order_bind, SortedAggregateState &other) {
  if (other.ordering) {
  // Force CDC if the other hash it
  @@ -223,18 +247,7 @@ struct SortedAggregateFunction {
  continue;
  }
  - DataChunk arg_chunk;
  - arg_chunk.InitializeEmpty(arg_inputs.GetTypes());
  - arg_chunk.Slice(arg_inputs, order_state->sel, order_state->nsel);
  -
  - DataChunk sort_chunk;
  - sort_chunk.InitializeEmpty(sort_inputs.GetTypes());
  - sort_chunk.Slice(sort_inputs, order_state->sel, order_state->nsel);
  -
  - order_state->Update(*order_bind, sort_chunk, arg_chunk);
  -
  - // Mark the slice as empty now we have consumed it.
  - order_state->nsel = 0;
  + order_state->UpdateSlice(*order_bind, sort_inputs, arg_inputs);
  }
  }
  