ariel-miculas commented on code in PR #23606:
URL: https://github.com/apache/datafusion/pull/23606#discussion_r3587977687
##########
datafusion/physical-plan/src/sorts/merge.rs:
##########
@@ -374,8 +384,12 @@ impl<C: CursorValues> SortPreservingMergeStream<C> {
if let Some(cursor) = &mut self.cursors[stream_idx] {
let _ = cursor.advance();
if cursor.is_finished() {
- // Take the current cursor, leaving `None` in its place
- self.prev_cursors[stream_idx] =
self.cursors[stream_idx].take();
+ if self.enable_round_robin_tie_breaker {
+ // Take the current cursor, leaving `None` in its place
+ self.prev_cursors[stream_idx] =
self.cursors[stream_idx].take();
+ } else {
+ self.cursors[stream_idx].take();
Review Comment:
I'm not convinced it's clearer and I also like that `take` is used in both
branches
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]