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

Method intersect_distinct

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

Calculate the distinct 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?;

(self, dataframe: DataFrame)

Source from the content-addressed store, hash-verified

1879 /// # }
1880 /// ```
1881 pub fn intersect_distinct(self, dataframe: DataFrame) -> Result<DataFrame> {
1882 let left_plan = self.plan;
1883 let right_plan = dataframe.plan;
1884 let plan = LogicalPlanBuilder::intersect(left_plan, right_plan, false)?;
1885 Ok(DataFrame {
1886 session_state: self.session_state,
1887 plan,
1888 projection_requires_validation: true,
1889 })
1890 }
1891
1892 /// Calculate the exception of two [`DataFrame`]s. The two [`DataFrame`]s must have exactly the same schema
1893 ///

Callers 1

intersect_distinctFunction · 0.80

Calls 1

intersectFunction · 0.50

Tested by 1

intersect_distinctFunction · 0.64