Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

//! [`SessionContext`] API for registering data sources and executing queries

use std::any::Any;
use std::collections::HashSet;
use std::fmt::Debug;
use std::sync::{Arc, Weak};
Expand Down Expand Up @@ -2073,7 +2074,7 @@ impl From<SessionContext> for SessionStateBuilder {

/// A planner used to add extensions to DataFusion logical and physical plans.
#[async_trait]
pub trait QueryPlanner: Debug {
pub trait QueryPlanner: Any + Debug {
/// Given a [`LogicalPlan`], create an [`ExecutionPlan`] suitable for execution
async fn create_physical_plan(
&self,
Expand Down
11 changes: 11 additions & 0 deletions docs/source/library-user-guide/upgrading/54.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,3 +649,14 @@ move the borrow behind an interior-mutability primitive such as `Arc<Mutex<_>>`
or `Arc<OnceLock<_>>`.

See [PR #21803](https://github.com/apache/datafusion/pull/21803) for details.

### `QueryPlanner` adds `Any` as a supertrait

To enable downcasting of `dyn QueryPlanner` to concrete query planner types (via
`is::<T>()` / `downcast_ref::<T>()`), the `QueryPlanner` trait now has `Any`
as a supertrait:

```diff
- pub trait QueryPlanner: Debug
+ pub trait QueryPlanner: Any + Debug
```
Loading