tustvold commented on code in PR #4615:
URL: https://github.com/apache/arrow-rs/pull/4615#discussion_r1281787103


##########
arrow-ord/src/partition.rs:
##########
@@ -22,15 +22,79 @@ use arrow_schema::ArrowError;
 use std::cmp::Ordering;
 use std::ops::Range;
 
-/// Given a list of already sorted columns, find partition ranges that would 
partition
-/// lexicographically equal values across columns.
+/// Given a list of already sorted columns, returns [`Range`]es that
+/// partition the input such that each partition has equal values
+/// across sort columns.
 ///
-/// Here LexicographicalComparator is used in conjunction with binary
-/// search so the columns *MUST* be pre-sorted already.
+/// Returns an error if no columns are specified or all columns do not
+/// have the same number of rows.
 ///
-/// The returned vec would be of size k where k is cardinality of the sorted 
values; Consecutive
-/// values will be connected: (a, b) and (b, c), where start = 0 and end = n 
for the first and last
-/// range.
+/// Returns an iterator with `k` items where `k` is cardinality of the
+/// sort values: Consecutive values will be connected: `(a, b)` and `(b,
+/// c)`, where `start = 0` and `end = n` for the first and last range.

Review Comment:
   ```suggestion
   /// Returns an iterator with `k` items where `k` is cardinality of the
   /// sort values. Consecutive ranges will be contiguous: `(a, b)` and `(b,
   /// c)`, where `start = 0` and `end = n` for the first and last range.
   ```



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