wiedld commented on code in PR #7379:
URL: https://github.com/apache/arrow-datafusion/pull/7379#discussion_r1326274016
##########
datafusion/core/src/physical_plan/sorts/builder.rs:
##########
@@ -15,136 +15,230 @@
// specific language governing permissions and limitations
// under the License.
-use arrow::compute::interleave;
-use arrow::datatypes::SchemaRef;
-use arrow::record_batch::RecordBatch;
use datafusion_common::Result;
-use datafusion_execution::memory_pool::MemoryReservation;
+use std::collections::VecDeque;
+use std::mem::take;
-#[derive(Debug, Copy, Clone, Default)]
-struct BatchCursor {
- /// The index into BatchBuilder::batches
- batch_idx: usize,
+use super::cursor::Cursor;
+use super::stream::{BatchId, BatchOffset};
+
+pub type SortOrder = (BatchId, usize, BatchOffset); // batch_id, row_idx
(without offset)
Review Comment:
The BatchOffset comes from the cursor slices, as [discussed
here](https://github.com/apache/arrow-datafusion/blob/d52049675ee5c335285635aea984d51b7cca9f74/datafusion/core/src/physical_plan/sorts/builder.rs#L170).
I'll also add a comment on the SortOrder type. TY!
--
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]