Skip to content

Commit

Permalink
Remove functions and types deprecated since 37 (apache#13056)
Browse files Browse the repository at this point in the history
* Remove deprecated CatalogList trait

Deprecated since v 35.

* Remove deprecated unnest_column(s) dataframe functions

Deprecated since v 37.

* Remove deprecated LogicalPlan::inspect_expressions

Deprecated since v 37.
  • Loading branch information
findepi authored Oct 22, 2024
1 parent afecd7b commit cf60da9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
4 changes: 0 additions & 4 deletions datafusion/core/src/catalog_common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ pub use datafusion_sql::{ResolvedTableReference, TableReference};
use std::collections::BTreeSet;
use std::ops::ControlFlow;

/// See [`CatalogProviderList`]
#[deprecated(since = "35.0.0", note = "use [`CatalogProviderList`] instead")]
pub trait CatalogList: CatalogProviderList {}

/// Collects all tables and views referenced in the SQL statement. CTEs are collected separately.
/// This can be used to determine which tables need to be in the catalog for a query to be planned.
///
Expand Down
25 changes: 1 addition & 24 deletions datafusion/core/src/dataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,32 +373,9 @@ impl DataFrame {
self.select(expr)
}

/// Expand each list element of a column to multiple rows.
#[deprecated(since = "37.0.0", note = "use unnest_columns instead")]
pub fn unnest_column(self, column: &str) -> Result<DataFrame> {
self.unnest_columns(&[column])
}

/// Expand each list element of a column to multiple rows, with
/// behavior controlled by [`UnnestOptions`].
///
/// Please see the documentation on [`UnnestOptions`] for more
/// details about the meaning of unnest.
#[deprecated(since = "37.0.0", note = "use unnest_columns_with_options instead")]
pub fn unnest_column_with_options(
self,
column: &str,
options: UnnestOptions,
) -> Result<DataFrame> {
self.unnest_columns_with_options(&[column], options)
}

/// Expand multiple list/struct columns into a set of rows and new columns.
///
/// See also:
///
/// 1. [`UnnestOptions`] documentation for the behavior of `unnest`
/// 2. [`Self::unnest_column_with_options`]
/// See also: [`UnnestOptions`] documentation for the behavior of `unnest`
///
/// # Example
/// ```
Expand Down
21 changes: 0 additions & 21 deletions datafusion/expr/src/logical_plan/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,27 +423,6 @@ impl LogicalPlan {
exprs
}

#[deprecated(since = "37.0.0", note = "Use `apply_expressions` instead")]
pub fn inspect_expressions<F, E>(self: &LogicalPlan, mut f: F) -> Result<(), E>
where
F: FnMut(&Expr) -> Result<(), E>,
{
let mut err = Ok(());
self.apply_expressions(|e| {
if let Err(e) = f(e) {
// save the error for later (it may not be a DataFusionError
err = Err(e);
Ok(TreeNodeRecursion::Stop)
} else {
Ok(TreeNodeRecursion::Continue)
}
})
// The closure always returns OK, so this will always too
.expect("no way to return error during recursion");

err
}

/// Returns all inputs / children of this `LogicalPlan` node.
///
/// Note does not include inputs to inputs, or subqueries.
Expand Down

0 comments on commit cf60da9

Please sign in to comment.