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

Method except_distinct

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

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)

Source from the content-addressed store, hash-verified

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

Callers 1

except_distinctFunction · 0.80

Calls 1

exceptFunction · 0.85

Tested by 1

except_distinctFunction · 0.64