Apply a join using the specified expressions. Note that DataFusion automatically optimizes joins, including identifying and optimizing equality predicates. # Example ``` # use datafusion_expr::{Expr, col, LogicalPlanBuilder, # logical_plan::builder::LogicalTableSource, logical_plan::JoinType,}; # use std::sync::Arc; # use arrow::datatypes::{Schema, DataType, Field}; # use datafusion_common::Re
(
self,
right: LogicalPlan,
join_type: JoinType,
on_exprs: impl IntoIterator<Item = Expr>,
)
| 982 | /// # } |
| 983 | /// ``` |
| 984 | pub fn join_on( |
| 985 | self, |
| 986 | right: LogicalPlan, |
| 987 | join_type: JoinType, |
| 988 | on_exprs: impl IntoIterator<Item = Expr>, |
| 989 | ) -> Result<Self> { |
| 990 | let filter = on_exprs.into_iter().reduce(Expr::and); |
| 991 | |
| 992 | self.join_detailed( |
| 993 | right, |
| 994 | join_type, |
| 995 | (Vec::<Column>::new(), Vec::<Column>::new()), |
| 996 | filter, |
| 997 | NullEquality::NullEqualsNothing, |
| 998 | ) |
| 999 | } |
| 1000 | |
| 1001 | pub(crate) fn normalize(plan: &LogicalPlan, column: Column) -> Result<Column> { |
| 1002 | if column.relation.is_some() { |
nothing calls this directly
no test coverage detected