Calculate the distinct exception 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_long.csv", CsvReadOptions::new()) .await
(self, dataframe: DataFrame)
| 1959 | /// # } |
| 1960 | /// ``` |
| 1961 | pub fn except_distinct(self, dataframe: DataFrame) -> Result<DataFrame> { |
| 1962 | let left_plan = self.plan; |
| 1963 | let right_plan = dataframe.plan; |
| 1964 | let plan = LogicalPlanBuilder::except(left_plan, right_plan, false)?; |
| 1965 | Ok(DataFrame { |
| 1966 | session_state: self.session_state, |
| 1967 | plan, |
| 1968 | projection_requires_validation: true, |
| 1969 | }) |
| 1970 | } |
| 1971 | |
| 1972 | /// Execute this `DataFrame` and write the results to `table_name`. |
| 1973 | /// |