tokoko commented on code in PR #13127: URL: https://github.com/apache/datafusion/pull/13127#discussion_r1826066356
########## datafusion/substrait/src/logical_plan/consumer.rs: ########## @@ -1053,15 +1077,123 @@ pub async fn from_substrait_rel( return not_impl_err!("Unsupported exchange kind: {exchange_kind:?}"); } }; - Ok(LogicalPlan::Repartition(Repartition { + let plan = LogicalPlan::Repartition(Repartition { input, partitioning_scheme, - })) + }); + apply_emit_kind(exchange.common.as_ref(), plan) } _ => not_impl_err!("Unsupported RelType: {:?}", rel.rel_type), } } +fn retrieve_emit_kind(rel_common: Option<&RelCommon>) -> EmitKind { + // the default EmitKind is Direct if it is not set explicitly + let default = EmitKind::Direct(rel_common::Direct {}); + rel_common + .and_then(|rc| rc.emit_kind.as_ref()) + .map_or(default, |ek| ek.clone()) +} + +fn contains_volatile_expr(proj: &Projection) -> Result<bool> { Review Comment: yes, I'm fine with that. We can always revisit if this actually has an impact on something. -- 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