Skip to content

Commit

Permalink
Minor: improve LogicalPlanBuilder::join_with_expr_keys docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Nov 6, 2024
1 parent ca59c72 commit 5bbf4e9
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions datafusion/expr/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ impl LogicalPlanBuilder {
self.join_detailed(right, join_type, join_keys, filter, false)
}

/// Apply a join with using the specified expressions.
/// Apply a join using the specified expressions.
///
/// Note that DataFusion automatically optimizes joins, including
/// identifying and optimizing equality predicates.
Expand Down Expand Up @@ -1200,12 +1200,20 @@ impl LogicalPlanBuilder {
Ok(Arc::unwrap_or_clone(self.plan))
}

/// Apply a join with the expression on constraint.
/// Apply a join with both explicit equijoin and non equijoin predicates.
///
/// equi_exprs are "equijoin" predicates expressions on the existing and right inputs, respectively.
/// Note this is a low level API that requires identifying specific
/// predicate types. Most users should use [`join_on`](Self::join_on) that
/// automatically identifies predicates appropriately.
///
/// filter: any other filter expression to apply during the join. equi_exprs predicates are likely
/// to be evaluated more quickly than the filter expressions
/// `equi_exprs` defines equijoin predicates, of the form `l = r)` for each
/// `(l, r)` tuple. `l`, the first element of the tuple, must only refer
/// to columns from the existing input. `r`, the second element of the tuple,
/// must only refer to columns from the right input.
///
/// `filter` contains any other other filter expression to apply during the
/// join. Note that `equi_exprs` predicates are evaluated more efficiently
/// than the filter expressions, so are preferred.
pub fn join_with_expr_keys(
self,
right: LogicalPlan,
Expand Down

0 comments on commit 5bbf4e9

Please sign in to comment.