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 4668bf9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions native/core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,17 +708,7 @@ impl PhysicalPlanner {
args,
return_type,
));

let is_null_expr: Arc<dyn PhysicalExpr> = Arc::new(IsNullExpr::new(left));
let null_literal_expr: Arc<dyn PhysicalExpr> =
Arc::new(Literal::new(ScalarValue::Null));

let case_expr = CaseExpr::try_new(
None,
vec![(is_null_expr, null_literal_expr)],
Some(array_append_expr),
)?;
Ok(Arc::new(case_expr))
Ok(array_append_expr)
}
ExprStruct::ArrayInsert(expr) => {
let src_array_expr = self.create_expr(
Expand Down

0 comments on commit 4668bf9

Please sign in to comment.