You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by al...@apache.org on 2024/11/01 19:05:39 UTC

(datafusion) branch main updated: Minor: fix merge conflict (#13219)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 9ff0800538 Minor: fix merge conflict (#13219)
9ff0800538 is described below

commit 9ff08005382d5d71fa5e9b176ed01c087e649c4b
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Fri Nov 1 15:05:33 2024 -0400

    Minor: fix merge conflict (#13219)
---
 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 a12406bd34..7ccca8616b 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<bool> {
-    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<Expr> = vec![];
                     for field in output_mapping {
                         let expr = proj.expr


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org