vbarua commented on code in PR #13127:
URL: https://github.com/apache/datafusion/pull/13127#discussion_r1826045355
##########
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:
> but what if it's a fairly complicated subquery expression that's being
repeated?
I'm going to choose to leave that as a follow-up and/or punt to the
optimizer if that's okay?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]