Skip to content

Commit

Permalink
expose some fields on session state
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia committed Jul 1, 2024
1 parent 729b356 commit d7bda5c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,21 @@ impl SessionState {
Ok(plan)
}

/// Returns the [`Analyzer`] for this session
pub fn analyzer(&self) -> &Analyzer {
&self.analyzer
}

/// Returns the [`Optimizer`] for this session
pub fn optimizer(&self) -> &Optimizer {
&self.optimizer
}

/// Returns the [`QueryPlanner`] for this session
pub fn query_planner(&self) -> &Arc<dyn QueryPlanner + Send + Sync> {
&self.query_planner
}

/// Optimizes the logical plan by applying optimizer rules.
pub fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan> {
if let LogicalPlan::Explain(e) = plan {
Expand Down

0 comments on commit d7bda5c

Please sign in to comment.