Skip to content

Commit 5e835b0

Browse files
authored
Mark default_session_builder deprecated, add since markings (#6123)
1 parent aec3420 commit 5e835b0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

datafusion/core/src/dataframe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ impl DataFrame {
825825
/// Note: This method should not be used outside testing, as it loses the snapshot
826826
/// of the [`SessionState`] attached to this [`DataFrame`] and consequently subsequent
827827
/// operations may take place against a different state
828-
#[deprecated(note = "Use DataFrame::into_optimized_plan")]
828+
#[deprecated(since = "23.0.0", note = "Use DataFrame::into_optimized_plan")]
829829
pub fn to_logical_plan(self) -> Result<LogicalPlan> {
830830
self.into_optimized_plan()
831831
}

datafusion/core/src/execution/context.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,7 @@ impl SessionContext {
11081108
///
11091109
/// [`table`]: SessionContext::table
11101110
#[deprecated(
1111+
since = "23.0.0",
11111112
note = "Please use the catalog provider interface (`SessionContext::catalog`) to examine available catalogs, schemas, and tables"
11121113
)]
11131114
pub fn tables(&self) -> Result<HashSet<String>> {
@@ -1124,6 +1125,7 @@ impl SessionContext {
11241125

11251126
/// Optimizes the logical plan by applying optimizer rules.
11261127
#[deprecated(
1128+
since = "23.0.0",
11271129
note = "Use SessionState::optimize to ensure a consistent state for planning and execution"
11281130
)]
11291131
pub fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan> {
@@ -1132,6 +1134,7 @@ impl SessionContext {
11321134

11331135
/// Creates a physical plan from a logical plan.
11341136
#[deprecated(
1137+
since = "23.0.0",
11351138
note = "Use SessionState::create_physical_plan or DataFrame::create_physical_plan to ensure a consistent state for planning and execution"
11361139
)]
11371140
pub async fn create_physical_plan(
@@ -1281,6 +1284,10 @@ impl Debug for SessionState {
12811284
}
12821285

12831286
/// Default session builder using the provided configuration
1287+
#[deprecated(
1288+
since = "23.0.0",
1289+
note = "See SessionContext::with_config() or SessionState::with_config_rt"
1290+
)]
12841291
pub fn default_session_builder(config: SessionConfig) -> SessionState {
12851292
SessionState::with_config_rt(config, Arc::new(RuntimeEnv::default()))
12861293
}

0 commit comments

Comments
 (0)