Skip to content

Commit

Permalink
Removes unnecessary case expression for handling null values
Browse files Browse the repository at this point in the history
  • Loading branch information
dharanad committed Dec 11, 2024
1 parent edcc168 commit feaa492
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions native/core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,15 +748,7 @@ impl PhysicalPlanner {
args,
DataType::Boolean,
));
let is_array_null: Arc<dyn PhysicalExpr> =
Arc::new(IsNullExpr::new(src_array_expr));
let null_literal_expr: Arc<dyn PhysicalExpr> =
Arc::new(Literal::new(ScalarValue::Null));
Ok(Arc::new(CaseExpr::try_new(
None,
vec![(is_array_null, null_literal_expr)],
Some(array_has_expr),
)?))
Ok(array_has_expr)
}
expr => Err(ExecutionError::GeneralError(format!(
"Not implemented: {:?}",
Expand Down

0 comments on commit feaa492

Please sign in to comment.