alamb opened a new issue, #7766: URL: https://github.com/apache/arrow-datafusion/issues/7766
### Is your feature request related to a problem or challenge? While working on https://github.com/apache/arrow-datafusion/pull/7612 with @nseekhao I think the [`LogicalPlanBuilder::join*`](https://docs.rs/datafusion/latest/datafusion/logical_expr/struct.LogicalPlanBuilder.html#method.join) interfaces are confusing: Specifically, they all have a space to put parallel lists of join columns join_keys: ([Vec](https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html)<impl [Into](https://doc.rust-lang.org/nightly/core/convert/trait.Into.html)<[Column](https://docs.rs/datafusion/latest/datafusion/common/struct.Column.html)>, [Global](https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html)>, [Vec](https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html)<impl [Into](https://doc.rust-lang.org/nightly/core/convert/trait.Into.html)<[Column](https://docs.rs/datafusion/latest/datafusion/common/struct.Column.html)>, [Global](https://doc.rust-lang.org/nightly/alloc/alloc/struct.Global.html)>), filter: [Option](https://doc.rust-lang.org/nightly/core/option/enum.Option.html)<[Expr](https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.Expr.html)> However, the the [ExtractEquijoinPredicate](https://github.com/apache/arrow-datafusion/blob/093b775adc3593e9e5cb7343e28406ed458551ad/datafusion/optimizer/src/extract_equijoin_predicate.rs#L31-L41) optimizer pass already splits up join predicates into equijoin predicates and "other" predicates [DataFrame::join_on](https://docs.rs/datafusion/latest/datafusion/dataframe/struct.DataFrame.html#method.join_on) uses this interface to nice effect: ```rust pub fn join_on( self, right: DataFrame, join_type: JoinType, on_exprs: impl IntoIterator<Item = Expr> ) -> Result<DataFrame> ``` ### Describe the solution you'd like I would like someone to 1. add LogicalPlanBuilder::join_on, that does the same thing as DataFrame::join_on 2. Add documentation that explains subsequent optimizer passes will split apart expressions, so there is no need to do so if you don't want to 3. Add a doc example to `LogicalPlanBuilder::join_on` that shows how to use it Something like ```rust impl LogicalPlanBuilder { pub fn join_on( self, right: DataFrame, join_type: JoinType, on_exprs: impl IntoIterator<Item = Expr> ) -> Result<DataFrame> { ... } ``` ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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]
