Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Aug 12, 2022
1 parent 75fce73 commit a7dd33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion/physical-expr/src/expressions/case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ impl PhysicalExpr for CaseExpr {
let mut data_type = DataType::Null;
for i in 0..self.when_then_expr.len() {
data_type = self.when_then_expr[i].1.data_type(input_schema)?;
if !data_type.equals_datatype(&DataType::Null) {
if !(data_type == DataType::Null) {
break;
}
}
// if all then results are null, we use data type of else expr instead if possible.
if data_type.equals_datatype(&DataType::Null) {
if data_type == DataType::Null {
if let Some(e) = &self.else_expr {
data_type = e.data_type(input_schema)?;
}
Expand Down

0 comments on commit a7dd33a

Please sign in to comment.