From 8a07a8f8e6e0d07804b06e7ea99f1a148ef1b5b6 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 1 Nov 2024 14:10:38 -0400 Subject: [PATCH] Minor: fix merge conflict --- datafusion/substrait/src/logical_plan/consumer.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/datafusion/substrait/src/logical_plan/consumer.rs b/datafusion/substrait/src/logical_plan/consumer.rs index a12406bd3439..7ccca8616ba0 100644 --- a/datafusion/substrait/src/logical_plan/consumer.rs +++ b/datafusion/substrait/src/logical_plan/consumer.rs @@ -1126,13 +1126,8 @@ fn retrieve_emit_kind(rel_common: Option<&RelCommon>) -> EmitKind { .map_or(default, |ek| ek.clone()) } -fn contains_volatile_expr(proj: &Projection) -> Result { - for expr in proj.expr.iter() { - if expr.is_volatile()? { - return Ok(true); - } - } - Ok(false) +fn contains_volatile_expr(proj: &Projection) -> bool { + proj.expr.iter().any(|e| e.is_volatile()) } fn apply_emit_kind( @@ -1151,7 +1146,7 @@ fn apply_emit_kind( // expressions in the projection are volatile. This is to avoid issues like // converting a single call of the random() function into multiple calls due to // duplicate fields in the output_mapping. - LogicalPlan::Projection(proj) if !contains_volatile_expr(&proj)? => { + LogicalPlan::Projection(proj) if !contains_volatile_expr(&proj) => { let mut exprs: Vec = vec![]; for field in output_mapping { let expr = proj.expr