From 1c923f192fbac02a499cae61c5391ea0246eafd4 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 26 Apr 2023 07:24:09 -0400 Subject: [PATCH] Mark default_session_builder deprecated, add since markings --- datafusion/core/src/dataframe.rs | 2 +- datafusion/core/src/execution/context.rs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/datafusion/core/src/dataframe.rs b/datafusion/core/src/dataframe.rs index 380f722a42ba..760ce7c0f59b 100644 --- a/datafusion/core/src/dataframe.rs +++ b/datafusion/core/src/dataframe.rs @@ -825,7 +825,7 @@ impl DataFrame { /// Note: This method should not be used outside testing, as it loses the snapshot /// of the [`SessionState`] attached to this [`DataFrame`] and consequently subsequent /// operations may take place against a different state - #[deprecated(note = "Use DataFrame::into_optimized_plan")] + #[deprecated(since = "23.0.0", note = "Use DataFrame::into_optimized_plan")] pub fn to_logical_plan(self) -> Result { self.into_optimized_plan() } diff --git a/datafusion/core/src/execution/context.rs b/datafusion/core/src/execution/context.rs index 265595c59d41..476cd9fbe8ed 100644 --- a/datafusion/core/src/execution/context.rs +++ b/datafusion/core/src/execution/context.rs @@ -1074,6 +1074,7 @@ impl SessionContext { /// /// [`table`]: SessionContext::table #[deprecated( + since = "23.0.0", note = "Please use the catalog provider interface (`SessionContext::catalog`) to examine available catalogs, schemas, and tables" )] pub fn tables(&self) -> Result> { @@ -1090,6 +1091,7 @@ impl SessionContext { /// Optimizes the logical plan by applying optimizer rules. #[deprecated( + since = "23.0.0", note = "Use SessionState::optimize to ensure a consistent state for planning and execution" )] pub fn optimize(&self, plan: &LogicalPlan) -> Result { @@ -1098,6 +1100,7 @@ impl SessionContext { /// Creates a physical plan from a logical plan. #[deprecated( + since = "23.0.0", note = "Use SessionState::create_physical_plan or DataFrame::create_physical_plan to ensure a consistent state for planning and execution" )] pub async fn create_physical_plan( @@ -1247,6 +1250,10 @@ impl Debug for SessionState { } /// Default session builder using the provided configuration +#[deprecated( + since = "23.0.0", + note = "See SessionContext::with_config() or SessionState::with_config_rt" +)] pub fn default_session_builder(config: SessionConfig) -> SessionState { SessionState::with_config_rt(config, Arc::new(RuntimeEnv::default())) }