Skip to content

Commit 390c7c7

Browse files
Remove unreachable NULL match arm in ScalarValue::partial_cmp
1 parent 4fb4147 commit 390c7c7

File tree

1 file changed

+2
-1
lines changed
  • datafusion/common/src/scalar

1 file changed

+2
-1
lines changed

datafusion/common/src/scalar/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ impl PartialOrd for ScalarValue {
576576
// any newly added enum variant will require editing this list
577577
// or else face a compile error
578578
match (self, other) {
579-
(Null, _) | (_, Null) => None,
580579
(Decimal32(v1, p1, s1), Decimal32(v2, p2, s2)) => {
581580
if p1.eq(p2) && s1.eq(s2) {
582581
v1.partial_cmp(v2)
@@ -728,6 +727,8 @@ impl PartialOrd for ScalarValue {
728727
if k1 == k2 { v1.partial_cmp(v2) } else { None }
729728
}
730729
(Dictionary(_, _), _) => None,
730+
// Null is handled by the early return above, but we need this for exhaustiveness
731+
(Null, _) => None,
731732
}
732733
}
733734
}

0 commit comments

Comments
 (0)