Skip to content

Minor: Mark default_session_builder deprecated, add since markings #6123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2023
Merged
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
2 changes: 1 addition & 1 deletion datafusion/core/src/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<LogicalPlan> {
self.into_optimized_plan()
}
Expand Down
7 changes: 7 additions & 0 deletions datafusion/core/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<HashSet<String>> {
Expand All @@ -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<LogicalPlan> {
Expand All @@ -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(
Expand Down Expand Up @@ -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()))
}
Expand Down