Apache DataFusion SQL Query Engine
minor: add `Any` to `QueryPlanner` trait (#22241)
Marko Milenković58b94f6562ed
diff --git a/datafusion/core/src/execution/context/mod.rs b/datafusion/core/src/execution/context/mod.rsindex 67dbe6b740..a732275dfc 100644--- a/datafusion/core/src/execution/context/mod.rs+++ b/datafusion/core/src/execution/context/mod.rs@@ -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};@@ -2155,7 +2156,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 executionasync fn create_physical_plan(&self,diff --git a/docs/source/library-user-guide/upgrading/55.0.0.md b/docs/source/library-user-guide/upgrading/55.0.0.mdindex ad96e9b878..54bacbdff2 100644--- a/docs/source/library-user-guide/upgrading/55.0.0.md+++ b/docs/source/library-user-guide/upgrading/55.0.0.md@@ -85,3 +85,14 @@ such a pruner can never prune anything beyond what planning already did.Previously it returned `Some` whenever a statistics struct was present (the"is this worth pruning?" decision lived in the Parquet opener). Files with columnstatistics, and predicates that carry a dynamic filter, are unaffected.++### `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+```