Skip to content

Commit 95b8d73

Browse files
committed
polish
1 parent e9cf5f9 commit 95b8d73

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

datafusion/physical-plan/src/sorts/cursor.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,6 @@ impl CursorValues for StringViewArray {
369369
return false;
370370
}
371371

372-
if l_len == 0 && r_len == 0 {
373-
return true; // Both are empty strings, so they are equal
374-
}
375-
376372
unsafe { GenericByteViewArray::compare_unchecked(l, l_idx, r, r_idx).is_eq() }
377373
}
378374

@@ -394,10 +390,6 @@ impl CursorValues for StringViewArray {
394390
return false;
395391
}
396392

397-
if l_len == 0 && r_len == 0 {
398-
return true; // Both are empty strings, so they are equal
399-
}
400-
401393
unsafe {
402394
GenericByteViewArray::compare_unchecked(cursor, idx, cursor, idx - 1).is_eq()
403395
}

datafusion/physical-plan/src/sorts/merge.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,12 @@ impl<C: CursorValues> SortPreservingMergeStream<C> {
493493
if self.enable_round_robin_tie_breaker && cmp_node == 1 {
494494
match (&self.cursors[winner], &self.cursors[challenger]) {
495495
(Some(ac), Some(bc)) => {
496-
let ord = ac.cmp(bc);
497-
if ord.is_eq() {
496+
if ac == bc {
498497
self.handle_tie(cmp_node, &mut winner, challenger);
499498
} else {
500499
// Ends of tie breaker
501500
self.round_robin_tie_breaker_mode = false;
502-
if ord.is_gt() {
501+
if ac > bc {
503502
self.update_winner(cmp_node, &mut winner, challenger);
504503
}
505504
}

0 commit comments

Comments
 (0)