alamb commented on code in PR #2645:
URL: https://github.com/apache/arrow-datafusion/pull/2645#discussion_r884261456


##########
datafusion/core/tests/sort_key_cursor.rs:
##########
@@ -0,0 +1,135 @@
+//! Contains tests for SortKeyCursor

Review Comment:
   These tests are new -- I plan to expand them over time



##########
datafusion/core/src/physical_plan/sorts/mod.rs:
##########
@@ -17,208 +17,16 @@
 
 //! Sort functionalities
 
-use crate::error;
-use crate::error::{DataFusionError, Result};
-use crate::physical_plan::{PhysicalExpr, SendableRecordBatchStream};
-use arrow::array::{ArrayRef, DynComparator};
-use arrow::compute::SortOptions;
-use arrow::record_batch::RecordBatch;
-use hashbrown::HashMap;
-use parking_lot::RwLock;
-use std::borrow::BorrowMut;
-use std::cmp::Ordering;
+use crate::physical_plan::SendableRecordBatchStream;
 use std::fmt::{Debug, Formatter};
-use std::sync::Arc;
 
+mod cursor;
+mod index;
 pub mod sort;
 pub mod sort_preserving_merge;
 
-/// A `SortKeyCursor` is created from a `RecordBatch`, and a set of

Review Comment:
   This code is just moved



##########
datafusion/core/src/physical_plan/sorts/index.rs:
##########
@@ -0,0 +1,42 @@
+/// A `RowIndex` identifies a specific row in a logical stream.
+///
+/// Each stream is identified by an `stream_idx` and is formed from a

Review Comment:
   This code is moved into a new module, and I added some comments / ascii art 
to help my future self not have to read the code the next time



##########
datafusion/core/src/physical_plan/sorts/cursor.rs:
##########
@@ -0,0 +1,203 @@
+use crate::error;
+use crate::error::{DataFusionError, Result};
+use crate::physical_plan::PhysicalExpr;
+use arrow::array::{ArrayRef, DynComparator};
+use arrow::compute::SortOptions;
+use arrow::record_batch::RecordBatch;
+use hashbrown::HashMap;
+use parking_lot::RwLock;
+use std::borrow::BorrowMut;
+use std::cmp::Ordering;
+use std::sync::Arc;
+
+/// A `SortKeyCursor` is created from a `RecordBatch`, and a set of

Review Comment:
   This code is moved, and I added `stream_id()` and `batch_idx()` accessors



-- 
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]

Reply via email to