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

Method join_on

datafusion/core/src/dataframe/mod.rs:1349–1363  ·  view source on GitHub ↗

Join this `DataFrame` with another `DataFrame` using the specified expressions. Note that DataFusion automatically optimizes joins, including identifying and optimizing equality predicates. # Example ``` # use datafusion::prelude::*; # use datafusion::error::Result; # use datafusion_common::assert_batches_sorted_eq; # #[tokio::main] # async fn main() -> Result<()> { let ctx = SessionContext::new

(
        self,
        right: DataFrame,
        join_type: JoinType,
        on_exprs: impl IntoIterator<Item = Expr>,
    )

Source from the content-addressed store, hash-verified

1347 /// # }
1348 /// ```
1349 pub fn join_on(
1350 self,
1351 right: DataFrame,
1352 join_type: JoinType,
1353 on_exprs: impl IntoIterator<Item = Expr>,
1354 ) -> Result<DataFrame> {
1355 let plan = LogicalPlanBuilder::from(self.plan)
1356 .join_on(right.plan, join_type, on_exprs)?
1357 .build()?;
1358 Ok(DataFrame {
1359 session_state: self.session_state,
1360 plan,
1361 projection_requires_validation: true,
1362 })
1363 }
1364
1365 /// Repartition a DataFrame based on a logical partitioning scheme.
1366 ///

Calls 1

buildMethod · 0.45