tustvold commented on code in PR #7798: URL: https://github.com/apache/arrow-datafusion/pull/7798#discussion_r1356533299
########## datafusion/physical-plan/src/sorts/cursor.rs: ########## @@ -99,19 +102,45 @@ pub trait Cursor: Ord { /// Advance the cursor, returning the previous row index fn advance(&mut self) -> usize; + + /// Slice the cursor at a given row index, returning a new cursor + /// + /// Returns an error if the slice is out of bounds, or memory is insufficient + fn slice(&self, offset: usize, length: usize) -> Result<Self> Review Comment: Does this interface need to be fallible? It looks like the only error is out of bounds, which would imply a logic error at which point I think a panic is fine? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org