File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
datafusion/physical-expr/src/expressions Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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 } ?;
You can’t perform that action at this time.
0 commit comments