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