zhuqi-lucas opened a new issue, #15375:
URL: https://github.com/apache/datafusion/issues/15375
### Is your feature request related to a problem or challenge?
We should investigate and improve the sort code to support concat_batches
for more cases besides the following case:
```rust
// If less than sort_in_place_threshold_bytes, concatenate and sort
in place
if self.reservation.size() < self.sort_in_place_threshold_bytes {
// Concatenate memory batches together and sort
let batch = concat_batches(&self.schema, &self.in_mem_batches)?;
self.in_mem_batches.clear();
self.reservation
.try_resize(get_reserved_byte_for_record_batch(&batch))?;
let reservation = self.reservation.take();
return self.sort_batch_stream(batch, metrics, reservation);
}
```
See details about the performance improvement:
https://github.com/apache/datafusion/pull/15348#issuecomment-2747123093
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]