alexanderbianchi commented on code in PR #26603:
URL: https://github.com/apache/datafusion/pull/26603#discussion_r4413402716
##########
datafusion/substrait/src/logical_plan/consumer/rel/join_rel.rs:
##########
@@ -33,12 +36,20 @@ pub async fn from_join_rel(
return not_impl_err!("JoinRel with post_join_filter is not yet
supported");
}
- let left: LogicalPlanBuilder = LogicalPlanBuilder::from(
- consumer.consume_rel(join.left.as_ref().unwrap()).await?,
- );
- let right = LogicalPlanBuilder::from(
- consumer.consume_rel(join.right.as_ref().unwrap()).await?,
- );
+ let (Some(left), Some(right)) = (join.left.as_deref(),
join.right.as_deref()) else {
+ return substrait_err!("JoinRel requires left and right inputs");
+ };
+ let [left, right] = consumer
+ .consume_rel_inputs(&[left, right])
Review Comment:
Something like this
```rust
let nested =
context.with_outer_schema(outer_schema).with_lambda_parameters(parameters);
try_join_all(
inputs.iter().map(|rel| self.consume_rel(rel, context))
).await
```
That has some context where we can pass in the context explicitly removes
state front the consumer but is a broader API change.
--
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]