MCPcopy Create free account
hub / github.com/apache/datafusion / join_on

Method join_on

datafusion/expr/src/logical_plan/builder.rs:984–999  ·  view source on GitHub ↗

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>,
    )

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
join_detailedMethod · 0.80
into_iterMethod · 0.45

Tested by

no test coverage detected