Skip to content

Commit 6fce213

Browse files
committed
Align with and without expr code
1 parent d08a916 commit 6fce213

File tree

1 file changed

+3
-2
lines changed
  • datafusion/physical-expr/src/expressions

1 file changed

+3
-2
lines changed

datafusion/physical-expr/src/expressions/case.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,15 +798,16 @@ impl CaseExpr {
798798

799799
// If this is the last 'when' branch and there is no 'else' expression, there's no
800800
// point in calculating the remaining rows.
801-
if i == self.when_then_expr.len() - 1 && self.else_expr.is_none() {
801+
if self.else_expr.is_none() && i == self.when_then_expr.len() - 1 {
802802
return result_builder.finish();
803803
}
804804

805805
// Prepare the next when branch (or the else branch)
806806
let next_selection = match when_value.null_count() {
807807
0 => not(when_value),
808808
_ => {
809-
// `prep_null_mask_filter` is required to ensure the not operation treats nulls as false
809+
// `prep_null_mask_filter` is required to ensure the not operation treats nulls
810+
// as false
810811
not(&prep_null_mask_filter(when_value))
811812
}
812813
}?;

0 commit comments

Comments
 (0)