Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Apr 15, 2024
1 parent 5c4474e commit 7d77682
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions core/src/execution/datafusion/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,22 +496,12 @@ impl PhysicalPlanner {
.iter()
.map(|then| self.create_expr(then, input_schema.clone())),
)
.try_fold(
Vec::<(
Arc<dyn datafusion_physical_expr::PhysicalExpr>,
Arc<dyn datafusion_physical_expr::PhysicalExpr>,
)>::new(),
|mut acc, (a, b)| {
acc.push((a?, b?));
Ok::<
Vec<(
Arc<dyn datafusion_physical_expr::PhysicalExpr>,
Arc<dyn datafusion_physical_expr::PhysicalExpr>,
)>,
ExecutionError,
>(acc)
},
)?;
.try_fold(Vec::new(), |mut acc, (a, b)| {
acc.push((a?, b?));
Ok::<Vec<(Arc<dyn PhysicalExpr>, Arc<dyn PhysicalExpr>)>, ExecutionError>(
acc,
)
})?;

let else_phy_expr = match &case_when.else_expr {
None => None,
Expand Down

0 comments on commit 7d77682

Please sign in to comment.