Lordworms commented on code in PR #11234: URL: https://github.com/apache/datafusion/pull/11234#discussion_r1664848320
########## datafusion/substrait/src/logical_plan/consumer.rs: ########## @@ -1125,17 +1125,45 @@ pub async fn from_substrait_rex( expr::ScalarFunction::new_udf(func.to_owned(), args), ))) } else if let Ok(op) = name_to_op(fn_name) { - if args.len() != 2 { + if f.arguments.len() < 2 { return not_impl_err!( - "Expect two arguments for binary operator {op:?}" + "Expect at least two arguments for binary operator {op:?}, the provided number of operators is {:?}", + f.arguments.len() ); } - Ok(Arc::new(Expr::BinaryExpr(BinaryExpr { - left: Box::new(args[0].to_owned()), - op, - right: Box::new(args[1].to_owned()), - }))) + let mut combined_expr: Option<Arc<Expr>> = None; + + // Iterate through all arguments to construct the combined expression + for arg in &f.arguments { + let next_expr = match &arg.arg_type { + Some(ArgType::Value(val)) => { + from_substrait_rex(ctx, val, input_schema, extensions).await? Review Comment: sure, since I forget to rebase at the first time -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org