tustvold commented on code in PR #7842:
URL: https://github.com/apache/arrow-datafusion/pull/7842#discussion_r1369070850
##########
datafusion/physical-plan/src/sorts/builder.rs:
##########
@@ -21,17 +21,15 @@ use arrow::record_batch::RecordBatch;
use datafusion_common::Result;
use datafusion_execution::memory_pool::MemoryReservation;
-#[derive(Debug, Copy, Clone, Default)]
-struct BatchCursor {
- /// The index into BatchBuilder::batches
- batch_idx: usize,
- /// The row index within the given batch
- row_idx: usize,
-}
+use super::batches::{BatchCursor, BatchId};
+use super::cursor::{Cursor, CursorValues};
+
+type YieldedSortOrder<C> = (Vec<SortOrder>, Vec<BatchCursor<C>>);
+type SortOrder = (BatchId, usize); // (batch_id, row_idx)
/// Provides an API to incrementally build a [`RecordBatch`] from partitioned
[`RecordBatch`]
#[derive(Debug)]
-pub struct BatchBuilder {
+pub struct SortOrderBuilder<C: CursorValues> {
Review Comment:
> That decision seems to have created confusion
Yeah perhaps you could roll that into this PR, whilst it will be larger, I
think it will be easier to review
--
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]