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

Method except

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

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

(self, dataframe: DataFrame)

Source from the content-addressed store, hash-verified

1919 /// # }
1920 /// ```
1921 pub fn except(self, dataframe: DataFrame) -> Result<DataFrame> {
1922 let left_plan = self.plan;
1923 let right_plan = dataframe.plan;
1924 let plan = LogicalPlanBuilder::except(left_plan, right_plan, true)?;
1925 Ok(DataFrame {
1926 session_state: self.session_state,
1927 plan,
1928 projection_requires_validation: true,
1929 })
1930 }
1931
1932 /// Calculate the distinct exception of two [`DataFrame`]s. The two [`DataFrame`]s must have exactly the same schema
1933 ///

Callers 2

exceptFunction · 0.45

Calls 1

exceptFunction · 0.85

Tested by 2

exceptFunction · 0.36