jayzhan211 commented on code in PR #11485:
URL: https://github.com/apache/datafusion/pull/11485#discussion_r1680215474
##########
datafusion/core/src/execution/session_state.rs:
##########
@@ -1597,12 +1583,20 @@ impl SessionStateDefaults {
}
}
+/// Adapter that implements the [`ContextProvider`] trait for a
[`SessionState`]
+///
+/// This is used so the SQL planner can access the state of the session without
+/// having a direct dependency on the [`SessionState`] struct (and core crate)
struct SessionContextProvider<'a> {
state: &'a SessionState,
tables: HashMap<String, Arc<dyn TableSource>>,
}
impl<'a> ContextProvider for SessionContextProvider<'a> {
+ fn get_expr_planners(&self) -> &[Arc<dyn ExprPlanner>] {
+ &self.state.expr_planners
Review Comment:
I remove `expr_planners` field in `SessionContextProvider` and get it from
state directly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]