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

Method intersect

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

Calculate the intersection of two [`DataFrame`]s. The two [`DataFrame`]s must have exactly the same schema ``` # use datafusion::prelude::*; # use datafusion::error::Result; # use datafusion_common::assert_batches_sorted_eq; # #[tokio::main] # async fn main() -> Result<()> { let ctx = SessionContext::new(); let df = ctx .read_csv("tests/data/example.csv", CsvReadOptions::new()) .await?; let d2 =

(self, dataframe: DataFrame)

Source from the content-addressed store, hash-verified

1841 /// # }
1842 /// ```
1843 pub fn intersect(self, dataframe: DataFrame) -> Result<DataFrame> {
1844 let left_plan = self.plan;
1845 let right_plan = dataframe.plan;
1846 let plan = LogicalPlanBuilder::intersect(left_plan, right_plan, true)?;
1847 Ok(DataFrame {
1848 session_state: self.session_state,
1849 plan,
1850 projection_requires_validation: true,
1851 })
1852 }
1853
1854 /// Calculate the distinct intersection of two [`DataFrame`]s. The two [`DataFrame`]s must have exactly the same schema
1855 ///

Callers 10

propagate_statisticsMethod · 0.45
propagate_constraintsMethod · 0.45
propagate_constraintsMethod · 0.45
propagate_arithmeticFunction · 0.45
propagate_comparisonFunction · 0.45
propagate_constraintsMethod · 0.45
propagate_rightFunction · 0.45
intersectFunction · 0.45

Calls 1

intersectFunction · 0.50

Tested by 1

intersectFunction · 0.36